57 virtual void Update(
const GameTime *pGameTime);
68 virtual bool IsActive()
const {
return m_isActive; }
74 virtual void Deactivate();
86 virtual std::string ToString()
const = 0;
90 virtual Vector2 GetHalfDimensions()
const;
94 virtual uint32_t
GetIndex()
const {
return m_index; }
108 virtual void Hit(
const float damage) { }
139 virtual void SetPosition(
const float x,
const float y);
145 virtual void SetPosition(
const Vector2 &position);
150 virtual void TranslatePosition(
const float x,
const float y);
156 virtual void TranslatePosition(
const Vector2 &offset);
161 virtual bool IsOnScreen()
const;
166 static Level *s_pCurrentLevel;
167 static uint32_t s_count;
178 float m_collisionRadius;
virtual void SetCollisionRadius(const int radius)
Sets the collision radius for the object.
Definition: GameObject.h:134
Base class for a shooter game. Inherit from this class when creating your own shooter game...
Definition: Game.h:21
virtual Vector2 & GetPreviousPosition()
Gets the previous position of the game object.
Definition: GameObject.h:82
virtual uint32_t GetIndex() const
Gets the index of the game object.
Definition: GameObject.h:94
Base class for all shooter levels.
Definition: Level.h:21
Contains timing values for game updates and rendering.
Definition: GameTime.h:17
bool Contains(const CollisionType &type)
Determines if the collision type contains another collision type.
Definition: CollisionType.h:136
virtual void SetDeactivateCallback(OnDeactivate callback)
Sets the callback function for when the menu item is selected.
Definition: GameObject.h:50
virtual float GetCollisionRadius() const
Gets the collision radius.
Definition: GameObject.h:104
Base class for all objects that will be updated and rendered on a GameplayScreen. ...
Definition: GameObject.h:29
Shooter Library is a library of classes, interfaces, and value types that provides a foundation for d...
Definition: Background.h:16
static Level * GetCurrentLevel()
Gets the current level.
Definition: GameObject.h:46
Defines a vector with 2 components (x and y). This is additional information...
Definition: Vector2.h:18
virtual bool IsDrawnByLevel() const
Determines if the level should draw the game object.
Definition: GameObject.h:127
virtual Vector2 & GetPosition()
Gets the position of the game object.
Definition: GameObject.h:78
virtual void Hit(const float damage)
Hits the object, dealing damage to it.
Definition: GameObject.h:108
virtual bool IsMask(CollisionType mask) const
Determines if the object matches a collision bit-mask.
Definition: GameObject.h:120
Enables a group of sprites to be drawn using the same settings.
Definition: SpriteBatch.h:44
virtual bool IsActive() const
Determines if the game object is active.
Definition: GameObject.h:68
static void SetCurrentLevel(Level *pLevel)
Sets the current game level.
Definition: GameObject.h:42
virtual bool HasMask(CollisionType mask) const
Determines if the object contains part of a collision bit-mask.
Definition: GameObject.h:114
void(* OnDeactivate)(GameObject *pGameObject)
Callback function for when a game object is deactivated.
Definition: GameObject.h:26
Defines the types of game objects that can collide with each other.
Definition: CollisionType.h:20
virtual void Activate()
Activates the game object.
Definition: GameObject.h:71
Katana Engine is a library of classes, interfaces, and value types that provides a foundation for dev...
Definition: Animation.cpp:14