|
Arcade Shooter
|
Base class for all Weapons. More...
#include <Weapon.h>
Public Member Functions | |
| Weapon (bool isActive=true) | |
| Instantiates a new weapon object. More... | |
| virtual void | Update (const GameTime *pGameTime) |
| Called when the game determines it is time to draw a frame. More... | |
| virtual void | Draw (SpriteBatch *pSpriteBatch) |
| Called when the game determines it is time to draw a frame. More... | |
| virtual void | Fire (TriggerType triggerType)=0 |
| Fires the weapon. More... | |
| virtual void | SetGameObject (GameObject *pGameObject) |
| Sets the game object that the weapon is attached to. More... | |
| virtual void | SetOffset (Vector2 offset) |
| Sets the position on the parented game object. More... | |
| virtual void | SetTriggerType (TriggerType triggerType) |
| Sets how the weapon is triggered. More... | |
| virtual void | SetProjectilePool (ProjectilePool *pPool)=0 |
| Sets the pool where the weapon gets it's projectiles. More... | |
| virtual void | Activate () |
| Activates the weapon. | |
| virtual void | Dectivate () |
| Deactivates the weapon. | |
| virtual bool | IsActive () const |
| Determines if the weapon is active. More... | |
Protected Member Functions | |
| virtual TriggerType | GetTriggerType () const |
| Gets the action that triggers the weapon. More... | |
| virtual Vector2 | GetPosition () const |
| Gets the weapon's position. More... | |
Base class for all Weapons.
|
inline |
Instantiates a new weapon object.
| isActive | Specifies if the weapon is active. |
|
inlinevirtual |
Called when the game determines it is time to draw a frame.
| pSpriteBatch | The game's sprite batch, used for rendering. |
|
pure virtual |
Fires the weapon.
| triggerType | Specifies how the weapon is triggered. |
Implemented in ShooterLibrary::Gun< T >, ShooterLibrary::Gun< Projectile >, and ShooterLibrary::Gun< Missile >.
|
inlineprotectedvirtual |
Gets the weapon's position.
|
inlineprotectedvirtual |
Gets the action that triggers the weapon.
|
inlinevirtual |
Determines if the weapon is active.
|
inlinevirtual |
Sets the game object that the weapon is attached to.
| pGameObject | The attached game object. |
|
inlinevirtual |
Sets the position on the parented game object.
| offset | The position on the game object. |
|
pure virtual |
Sets the pool where the weapon gets it's projectiles.
| pPool | The pool to use. |
Implemented in ShooterLibrary::Gun< T >, ShooterLibrary::Gun< Projectile >, and ShooterLibrary::Gun< Missile >.
|
inlinevirtual |
Sets how the weapon is triggered.
| triggerType | Specifies how the weapon is triggered. |
|
inlinevirtual |
Called when the game determines it is time to draw a frame.
| pGameTime | Timing values including time since last update. |
Reimplemented in ShooterLibrary::Gun< T >, ShooterLibrary::Gun< Projectile >, and ShooterLibrary::Gun< Missile >.
1.8.13