|
Arcade Shooter
|
Class for missiles. More...
#include <Missile.h>
Public Member Functions | |
| virtual void | SetAnimation (Animation *pAnimation) |
| Sets the animation for the missile. 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 | Activate (const Vector2 &position, bool wasShotByPlayer=true) |
| Activates the missile. More... | |
| virtual void | SetEmitter (Emitter *pEmitter) |
| Sets the particle emitter for particle trail. More... | |
| virtual std::string | ToString () const |
| Gets a string representation of the missile. More... | |
Public Member Functions inherited from ShooterLibrary::Projectile | |
| virtual float | GetDamage () const |
| Gets the damage of the projectile. More... | |
| virtual CollisionType | GetCollisionType () const |
| Gets the collision type mask. More... | |
| virtual bool | IsDrawnByLevel () const |
| Determines if the level should draw the projectile. More... | |
| virtual void | SetManualDraw (const bool drawManually=true) |
| Sets if the level should draw the projectile. More... | |
Public Member Functions inherited from ShooterLibrary::GameObject | |
| virtual void | SetDeactivateCallback (OnDeactivate callback) |
| Sets the callback function for when the menu item is selected. More... | |
| virtual void | Update (const GameTime *pGameTime) |
| Updates the game object. More... | |
| virtual void | Draw (SpriteBatch *pSpriteBatch)=0 |
| Renders the game object. More... | |
| virtual bool | IsActive () const |
| Determines if the game object is active. More... | |
| virtual void | Activate () |
| Activates the game object. | |
| virtual void | Deactivate () |
| Deactivates the game object. | |
| virtual Vector2 & | GetPosition () |
| Gets the position of the game object. More... | |
| virtual Vector2 & | GetPreviousPosition () |
| Gets the previous position of the game object. More... | |
| virtual Vector2 | GetHalfDimensions () const |
| Gets the half dimensions of the game object. More... | |
| virtual uint32_t | GetIndex () const |
| Gets the index of the game object. More... | |
| virtual float | GetCollisionRadius () const |
| Gets the collision radius. More... | |
| virtual void | Hit (const float damage) |
| Hits the object, dealing damage to it. More... | |
| virtual bool | HasMask (CollisionType mask) const |
| Determines if the object contains part of a collision bit-mask. More... | |
| virtual bool | IsMask (CollisionType mask) const |
| Determines if the object matches a collision bit-mask. More... | |
Protected Member Functions | |
| void | SetTurnSpeed (const float turnSpeed) |
| Sets the turn speed of the missile. More... | |
| void | SetRange (const float range) |
| Sets the target range of the missile. More... | |
| void | SetAngle (const float angle) |
| Sets the current angle of the missile. More... | |
| void | SetTarget (GameObject *pTarget=nullptr) |
| Sets the missile's target. More... | |
| void | ResetTargetingDelay () |
| Resets the timer for when the missile should reaquire a target. | |
| GameObject * | GetTarget () const |
| Gets the missile's target object. More... | |
Protected Member Functions inherited from ShooterLibrary::Projectile | |
| virtual void | SetSpeed (const float speed) |
| Sets the speed of the projectile. More... | |
| virtual void | SetDamage (const float damage) |
| Sets the amount of damage the projectile inflicts. More... | |
| virtual void | SetDirection (const Vector2 direction) |
| Sets the direction of the projectile. More... | |
| virtual float | GetSpeed () const |
| Gets the speed of the projectile in pixels per second. More... | |
| virtual Vector2 & | GetDirection () |
| Gets the direction of the projectile. More... | |
| virtual bool | WasShotByPlayer () const |
| Determines if the projectile was shot by a player. More... | |
| virtual CollisionType | GetProjectileType () const |
| Gets the collision type mask for the projectile. More... | |
| virtual std::string | GetProjectileTypeString () const |
| Gets a string representation of the projectile. More... | |
Protected Member Functions inherited from ShooterLibrary::GameObject | |
| virtual void | SetCollisionRadius (const int radius) |
| Sets the collision radius for the object. More... | |
| virtual void | SetPosition (const float x, const float y) |
| Sets the screen position of the object. More... | |
| virtual void | SetPosition (const Vector2 &position) |
| Sets the screen position of the object. More... | |
| virtual void | TranslatePosition (const float x, const float y) |
| Offsets the current screen position of the object. More... | |
| virtual void | TranslatePosition (const Vector2 &offset) |
| Offsets the current screen position of the object. More... | |
| virtual bool | IsOnScreen () const |
| Determines if the game object is on the screen. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from ShooterLibrary::Projectile | |
| static void | SetTexture (Texture *pTexture) |
| Sets the texture of the player ship. More... | |
Static Public Member Functions inherited from ShooterLibrary::GameObject | |
| static void | SetCurrentLevel (Level *pLevel) |
| Sets the current game level. More... | |
| static Level * | GetCurrentLevel () |
| Gets the current level. More... | |
Class for missiles.
|
virtual |
Activates the missile.
| position | The starting position of the missile. |
| wasShotByPlayer | Indicates if the player fired the missile. |
Reimplemented from ShooterLibrary::Projectile.
|
virtual |
Called when the game determines it is time to draw a frame.
| pSpriteBatch | The game's sprite batch, used for rendering. |
Reimplemented from ShooterLibrary::Projectile.
|
inlineprotected |
Gets the missile's target object.
|
inlineprotected |
Sets the current angle of the missile.
| angle | The missiles angle in radians. |
|
inlinevirtual |
Sets the animation for the missile.
| pAnimation | The animation to set for the missile. |
|
inlinevirtual |
Sets the particle emitter for particle trail.
| pEmitter | A pointer to the emitter. |
|
inlineprotected |
Sets the target range of the missile.
| range | The range which the missile can seek enemy targets. |
|
inlineprotected |
Sets the missile's target.
| pTarget | The missiles target, pass nullptr to unset the target. |
|
inlineprotected |
Sets the turn speed of the missile.
| turnSpeed | The degrees in radians that the missile can turn in one second. |
|
inlinevirtual |
Gets a string representation of the missile.
Reimplemented from ShooterLibrary::Projectile.
|
virtual |
Called when the game determines it is time to draw a frame.
| pGameTime | Timing values including time since last update. |
Reimplemented from ShooterLibrary::Projectile.
1.8.13