Arcade Shooter
EnemyShip.h
1 
2 /* . ,'`. .
3  . .." _.-;' ⁄‚ `. . `
4  _.-"`.##%"_.--" ,' ⁄` `. "#" ___,,od000
5  ,'"-_ _.-.--"\ ,' `-_ '%#%',,/00000000000
6  ,' |_.' )`/- __..--""`-_`-._ J L/00000000000000
7  . + ,' _.-" / / _-"" `-._`-_/___\///0000 000M
8  .'_.-"" ' :_/_.-' _,`-/__V__\0000 00MMM
9  . _-"" . ' _,/000\ | /000 0MMMMM
10 _-" . ' . . ,/ 000\ | /000000000MMMMM
11  ` Shooter Library ' ,/ 000\|/000000000MMMMMM
12 . © 2017 - Shuriken Studios LLC ,/0 00000|0000000000MMMMMM */
13 
14 #pragma once
15 
16 namespace ShooterLibrary
17 {
18 
20  class EnemyShip : public Ship
21  {
22 
23  public:
24 
25  EnemyShip();
26  virtual ~EnemyShip() { }
27 
31  virtual void Update(const GameTime *pGameTime);
32 
35  virtual void Draw(SpriteBatch *pSpriteBatch) = 0;
36 
40  virtual void Initialize(const Vector2 position, const double delaySeconds);
41 
43  virtual void Fire() { }
44 
47  virtual void Hit(const float damage);
48 
51  virtual std::string ToString() const { return "Enemy Ship"; }
52 
58 
59 
60  protected:
61 
64  virtual double GetDelaySeconds() const { return m_delaySeconds; }
65 
66 
67  private:
68 
69  double m_delaySeconds;
70 
71  double m_activationSeconds;
72 
73  };
74 }
virtual void Fire()
Fires the ships weapons.
Definition: EnemyShip.h:43
virtual std::string ToString() const
Gets a string representation of the enemy ship.
Definition: EnemyShip.h:51
virtual void Hit(const float damage)
Hits the ship, dealing damage to it.
Definition: EnemyShip.cpp:56
Shooter Library is a library of classes, interfaces, and value types that provides a foundation for d...
Definition: Background.h:16
virtual double GetDelaySeconds() const
Gets the number of seconds before the enemy activates.
Definition: EnemyShip.h:64
static const CollisionType ENEMY
Represents a enemy.
Definition: CollisionType.h:31
static const CollisionType SHIP
Represents a ship.
Definition: CollisionType.h:33
Base class for enemy ships.
Definition: EnemyShip.h:20
virtual void Initialize()
Initializes the ship.
Definition: Ship.cpp:54
virtual void Update(const GameTime *pGameTime)
Called when the game has determined that game logic needs to be processed.
Definition: EnemyShip.cpp:25
virtual void Draw(SpriteBatch *pSpriteBatch)=0
Called when the game determines it is time to draw a frame.
virtual CollisionType GetCollisionType() const
Gets the collision type mask.
Definition: EnemyShip.h:57
Base class for all ships.
Definition: Ship.h:22
Defines the types of game objects that can collide with each other.
Definition: CollisionType.h:20