27 m_isActive = isActive;
35 virtual void Update(
const GameTime *pGameTime) { };
39 virtual void Draw(SpriteBatch *pSpriteBatch) { };
51 virtual void SetOffset(Vector2 offset) { m_offset = offset; }
Used to recycle projectiles.
Definition: ProjectilePool.h:20
virtual bool IsActive() const
Determines if the weapon is active.
Definition: Weapon.h:69
Defines how different types of weapons should be triggered.
Definition: TriggerType.h:20
virtual void Dectivate()
Deactivates the weapon.
Definition: Weapon.h:65
virtual void SetOffset(Vector2 offset)
Sets the position on the parented game object.
Definition: Weapon.h:51
Base class for all objects that will be updated and rendered on a GameplayScreen. ...
Definition: GameObject.h:29
virtual void Activate()
Activates the weapon.
Definition: Weapon.h:62
Shooter Library is a library of classes, interfaces, and value types that provides a foundation for d...
Definition: Background.h:16
virtual void Draw(SpriteBatch *pSpriteBatch)
Called when the game determines it is time to draw a frame.
Definition: Weapon.h:39
virtual void SetProjectilePool(ProjectilePool *pPool)=0
Sets the pool where the weapon gets it's projectiles.
static const TriggerType PRIMARY
Represents a primary weapon trigger.
Definition: TriggerType.h:30
virtual Vector2 GetPosition() const
Gets the weapon's position.
Definition: Weapon.h:80
virtual Vector2 & GetPosition()
Gets the position of the game object.
Definition: GameObject.h:78
virtual TriggerType GetTriggerType() const
Gets the action that triggers the weapon.
Definition: Weapon.h:76
Weapon(bool isActive=true)
Instantiates a new weapon object.
Definition: Weapon.h:25
Base class for all Weapons.
Definition: Weapon.h:19
virtual bool IsActive() const
Determines if the game object is active.
Definition: GameObject.h:68
virtual void SetTriggerType(TriggerType triggerType)
Sets how the weapon is triggered.
Definition: Weapon.h:55
virtual void SetGameObject(GameObject *pGameObject)
Sets the game object that the weapon is attached to.
Definition: Weapon.h:47
virtual void Fire(TriggerType triggerType)=0
Fires the weapon.
virtual void Update(const GameTime *pGameTime)
Called when the game determines it is time to draw a frame.
Definition: Weapon.h:35