42 virtual bool IsActive()
const {
return m_isActive; }
72 virtual uint32_t
GetIndex()
const {
return m_index; }
84 virtual void Hit(
const float damage) { }
100 virtual void SetPosition(
const float x,
const float y);
113 static Level *s_pCurrentLevel;
114 static uint32_t s_count;
116 uint32_t m_index = 0;
118 bool m_isActive =
false;
123 float m_collisionRadius = 0;
Represents a type of collision.
bool Contains(const CollisionType &type) const
Check if the collision type contains a specific type.
Represents a game object in the game. This is the base class for all objects that can be updated,...
GameObject()
Instantiate a game object.
virtual void Hit(const float damage)
Hits the object with a specified amount of damage.
virtual CollisionType GetCollisionType() const =0
Get the collision type of the object.
static void SetCurrentLevel(Level *pLevel)
Set the current level.
virtual uint32_t GetIndex() const
Get the index of the object. Each object is assigned a unique ID when created, starting at 0.
virtual void TranslatePosition(const float x, const float y)
virtual bool IsDrawnByLevel() const
virtual void SetPosition(const float x, const float y)
virtual void SetCollisionRadius(const int radius)
virtual bool IsOnScreen() const
virtual void Activate()
Activate the object.
virtual bool HasMask(CollisionType mask) const
Check if the object has a specific collision bit-mask.
virtual bool IsActive() const
Flag to determine if the object is active.
virtual std::string ToString() const =0
Get the string representation of the object.
virtual void Deactivate()
Deactivate the object.
virtual Vector2 & GetPreviousPosition()
Get the position of the object during the previous frame.
virtual Vector2 GetHalfDimensions() const
Get the half dimensions of the object.
virtual bool IsMask(CollisionType mask) const
virtual void Draw(SpriteBatch &spriteBatch)=0
Render the object.
virtual float GetCollisionRadius() const
Get the collision radius of the object.
static Level * GetCurrentLevel()
Get the current level.
virtual void Update(const GameTime &gameTime)
Update the object.
virtual Vector2 & GetPosition()
Get the position of the object.
Contains timing values for game updates and rendering.
Enables a group of sprites to be drawn using the same settings.
Defines a vector with 2 components (x and y).
Represents a level in the game.
Katana Engine is a library of classes, interfaces, and value types that provides a foundation for dev...