57 lines
1.7 KiB
C++
57 lines
1.7 KiB
C++
/*
|
|
Copyright 2014 Michele "King_DuckZ" Santullo
|
|
|
|
This file is part of CloonelJump.
|
|
|
|
CloonelJump is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
CloonelJump is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with CloonelJump. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#ifndef id0CEACFB045ED4C9F8688265AA41E30B0
|
|
#define id0CEACFB045ED4C9F8688265AA41E30B0
|
|
|
|
#include "placeable.hpp"
|
|
#include "drawable.hpp"
|
|
#include "vector.hpp"
|
|
#include "sizenotifiable.hpp"
|
|
#include "horzcollisionbar.hpp"
|
|
#include "collidertypedef.hpp"
|
|
#include <string>
|
|
#include <memory>
|
|
|
|
namespace cloonel {
|
|
class SDLMain;
|
|
class Texture;
|
|
|
|
class Character : public Placeable, public Drawable {
|
|
public:
|
|
Character ( const std::string& parPath, SDLMain* parMain, float2 parSize );
|
|
Character ( const std::string&& parPath, SDLMain* parMain, float2 parSize );
|
|
virtual ~Character ( void ) noexcept;
|
|
|
|
void Prepare ( void );
|
|
void Destroy ( void ) noexcept;
|
|
virtual void Draw ( void ) const;
|
|
void RegisterForCollision ( ColliderRegisterFunc parRegisterCollision );
|
|
|
|
private:
|
|
//Overrides
|
|
virtual void OnRegister ( Mover& parMover, Mover::PlaceableTicketType parParentTicket );
|
|
|
|
HorzCollisionBar m_bottomBar;
|
|
SizeNotifiable<regbehaviours::AutoRegister> m_screenRatio;
|
|
const std::unique_ptr<Texture> m_texture;
|
|
};
|
|
} //unnamed namespace
|
|
|
|
#endif
|