Arcade Shooter
PowerUp.h
1 
2 /* .oooooo..o .o. ooo ooooo ooooooooo. ooooo oooooooooooo
3  d8P' `Y8 .888. `88. .888' `888 `Y88. `888' `888' `8
4  Y88bo. .8"888. 888b d'888 888 .d88' 888 888
5  `"Y8888o. .8' `888. 8 Y88. .P 888 888ooo88P' 888 888oooo8
6  `"Y88b .88ooo8888. 8 `888' 888 888 888 888 "
7  oo .d8P .8' `888. 8 Y 888 888 888 o 888 o
8  8""88888P' o88o o8888o o8o o888o o888o o888ooooood8 o888ooooood8
9 
10  Sample © 2017 - Shuriken Studios LLC */
11 
12 #pragma once
13 
14 namespace Sample
15 {
16 
19  {
20 
21  public:
22 
23  PowerUp();
24  virtual ~PowerUp() { }
25 
28  static void SetTexture(Texture *pTexture) { s_pTexture = pTexture; }
29 
32  static void SetGlowTexture(Texture *pTexture) { s_pGlowTexture = pTexture; }
33 
37  virtual void Update(const GameTime *pGameTime);
38 
41  virtual void Draw(SpriteBatch *pSpriteBatch);
42 
46  virtual void Activate(const Vector2 position, Level *pLevel);
47 
53 
56  virtual std::string ToString() const { return "Power Up"; }
57 
58 
59  private:
60 
61  static Texture *s_pTexture;
62  static Texture *s_pGlowTexture;
63 
64  Vector2 m_velocity;
65 
66  PlayerShip *m_pTarget;
67  int m_pMagnetDistance;
68 
69  Level *m_pLevel;
70 
71  int m_targetCheck;
72 
73  float m_alpha;
74 
75  };
76 }
Sample is a sample game to use as a template for using Katana Engine and Shooter Library.
Definition: Background.cpp:14
virtual void Draw(SpriteBatch *pSpriteBatch)
Called when the game determines it is time to draw a frame.
Definition: PowerUp.cpp:63
static const CollisionType POWERUP
Represents a power up.
Definition: CollisionType.h:24
virtual ShooterLibrary::CollisionType GetCollisionType() const
Gets the collision type mask.
Definition: PowerUp.h:52
Base class for all objects that will be updated and rendered on a GameplayScreen. ...
Definition: GameObject.h:29
Base class for shooter levels.
Definition: Level.h:26
static void SetTexture(Texture *pTexture)
Sets the texture of the power up.
Definition: PowerUp.h:28
static void SetGlowTexture(Texture *pTexture)
Sets the glow texture of the power up.
Definition: PowerUp.h:32
virtual void Update(const GameTime *pGameTime)
Called when the game has determined that game logic needs to be processed.
Definition: PowerUp.cpp:25
virtual std::string ToString() const
Gets a string representation of the power up.
Definition: PowerUp.h:56
Class for player ships.
Definition: PlayerShip.h:19
Class for power ups.
Definition: PowerUp.h:18
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