From a9e3a2b212fb5b60bb0479fa999ddeeaa0355598 Mon Sep 17 00:00:00 2001 From: Ekaitz Zarraga Date: Sun, 13 Nov 2022 18:21:41 +0100 Subject: Use base constructors to reduce code size --- src/graphics/animation.cpp | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'src/graphics/animation.cpp') diff --git a/src/graphics/animation.cpp b/src/graphics/animation.cpp index 577324a..f311cf0 100644 --- a/src/graphics/animation.cpp +++ b/src/graphics/animation.cpp @@ -71,13 +71,6 @@ namespace Graphics{ Animation::~Animation(){} // ONESHOT ANIMATION - OneShotAnimation::OneShotAnimation(){} - - OneShotAnimation::OneShotAnimation(const sf::Texture& texture, int count, - int switchTime, int height = 0, int width = 0, int row = 0): - Animation(texture, count, switchTime, height, width, row) { - } - bool OneShotAnimation::finished(){ return (i_ == count_ - 1); } @@ -98,14 +91,6 @@ namespace Graphics{ } // BOUNCING ANIMATION - BouncingAnimation::BouncingAnimation(){} - - BouncingAnimation::BouncingAnimation(const sf::Texture& texture, int count, - int switchTime, int height = 0, int width = 0, int row = 0): - Animation(texture, count, switchTime, height, width, row), - up_ (true) { - } - sf::IntRect& BouncingAnimation::next(int deltaTime){ if( !ticked(deltaTime) ) { return rect_; -- cgit v1.2.3