Some fixes

This commit is contained in:
SeanOMik 2020-07-12 22:46:27 -05:00
parent 5427f85c0a
commit 7808b7dbf7
No known key found for this signature in database
GPG Key ID: FA4D55AC05268A88
4 changed files with 6 additions and 6 deletions

View File

@ -23,7 +23,7 @@ namespace simpleengine {
HitboxComponent(Entity& owning_entity, sf::Sprite& sprite, float sprite_offset_x, float sprite_offset_y,
float width, float height);
sf::RectangleShape& GetHitbox() const;
sf::RectangleShape& GetHitbox();
bool DoesIntersect(const sf::FloatRect& rect);

View File

@ -36,8 +36,8 @@ namespace simpleengine {
void Update(const float& delta_time) override;
simpleengine::AnimationComponent GetAnimationComponent();
simpleengine::MovementComponent GetMovementComponent();
simpleengine::AnimationComponent& GetAnimationComponent();
simpleengine::MovementComponent& GetMovementComponent();
private:
std::string MovementAnimationTypeToStr(const MovementAnimationType& type);

View File

@ -24,7 +24,7 @@ simpleengine::HitboxComponent::HitboxComponent(Entity& owning_entity, sf::Sprite
}
}
sf::RectangleShape &simpleengine::HitboxComponent::GetHitbox() const {
sf::RectangleShape &simpleengine::HitboxComponent::GetHitbox() {
return hitbox;
}

View File

@ -111,10 +111,10 @@ std::string simpleengine::SideScrollerMovementAnimationComponent::MovementAnimat
}
}
simpleengine::AnimationComponent simpleengine::SideScrollerMovementAnimationComponent::GetAnimationComponent() {
simpleengine::AnimationComponent& simpleengine::SideScrollerMovementAnimationComponent::GetAnimationComponent() {
return anim_component;
}
simpleengine::MovementComponent simpleengine::SideScrollerMovementAnimationComponent::GetMovementComponent() {
simpleengine::MovementComponent& simpleengine::SideScrollerMovementAnimationComponent::GetMovementComponent() {
return move_component;
}