Arcade Shooter
Explosion.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 
18  class Explosion
19  {
20 
21  public:
22 
23  Explosion() { }
24  virtual ~Explosion() { }
27  virtual void Update(const GameTime *pGameTime);
28 
31  virtual void Draw(SpriteBatch *pSpriteBatch);
32 
35  virtual void SetAnimation(Animation *pAnimation) { m_pAnimation = pAnimation; }
36 
40  virtual void Activate(const Vector2 position, const float scale = 1);
41 
44  virtual bool IsActive() const { return m_pAnimation->IsPlaying(); }
45 
46 
47  protected:
48 
51  virtual void SetPosition(const Vector2 position) { m_position = position; }
52 
53 
54  private:
55 
56  Animation *m_pAnimation;
57 
58  Vector2 m_position;
59 
60  float m_rotation;
61  float m_scale;
62 
63  };
64 
65 }
virtual void Update(const GameTime *pGameTime)
Called when the game has determined that game logic needs to be processed.
Definition: Explosion.cpp:17
Sample is a sample game to use as a template for using Katana Engine and Shooter Library.
Definition: Background.cpp:14
virtual void SetPosition(const Vector2 position)
Sets the explosion's position.
Definition: Explosion.h:51
virtual void Draw(SpriteBatch *pSpriteBatch)
Called when the game determines it is time to draw a frame.
Definition: Explosion.cpp:23
virtual void Activate(const Vector2 position, const float scale=1)
Activates the explosion.
Definition: Explosion.cpp:33
virtual void SetAnimation(Animation *pAnimation)
Sets the explosion's animation.
Definition: Explosion.h:35
Base class for explosions.
Definition: Explosion.h:18
virtual bool IsActive() const
Determines if the explosion is active.
Definition: Explosion.h:44