33 virtual void LoadContent(ResourceManager *pResourceManager);
37 virtual void Update(
const GameTime *pGameTime);
41 virtual void Draw(SpriteBatch *pSpriteBatch);
49 virtual void Hit(
const float damage);
59 m_isAIControlled =
true;
60 m_targetPosition = position;
89 Animation *m_pAnimation;
90 Animation *m_pColorAnimation;
98 Animation *m_pThrusterAnimation;
99 Vector2 m_thrusterOffset[2];
100 float m_thrusterScale;
102 Vector2 m_targetPosition;
104 bool m_isAIControlled;
Sample is a sample game to use as a template for using Katana Engine and Shooter Library.
Definition: Background.cpp:14
virtual void HandleInput(const InputState *pInput)
Called when the game has determined that player input needs to be processed.
virtual void SetAITarget(Vector2 position)
Sets the target position for the AI to move to.
Definition: PlayerShip.h:57
virtual void Activate()
Activates the weapon.
Definition: Weapon.h:62
virtual bool IsAIControlled() const
Determines if the player ship is currently being controlled by AI.
Definition: PlayerShip.h:70
Base class for shooter levels.
Definition: Level.h:26
virtual Weapon * GetWeapon(const int index)
Gets the weapon at the specified index.
Definition: Ship.h:90
virtual void Initialize()
Initializes the ship.
Definition: Ship.cpp:54
Class for a missile launcher.
Definition: Launcher.h:19
virtual void ConfineToScreen(const bool isConfined=true)
Confines the player ship to the screen.
Definition: PlayerShip.h:64
Base class for player ships.
Definition: PlayerShip.h:20
virtual void LoadContent(ResourceManager *pResourceManager)
Called when resources need to be loaded.
Definition: PlayerShip.cpp:33
virtual void PowerUp()
Powers up the ship.
Definition: PlayerShip.h:75
virtual void Hit(const float damage)
Hits the ship, dealing damage to it.
Definition: PlayerShip.cpp:163
virtual bool IsActive() const
Determines if the game object is active.
Definition: GameObject.h:68
virtual void Draw(SpriteBatch *pSpriteBatch)
Called when the game determines it is time to draw a frame.
Class for player ships.
Definition: PlayerShip.h:19
virtual void Update(const GameTime *pGameTime)
Called when the game has determined that game logic needs to be processed.
virtual Vector2 GetHalfDimensions() const
Gets the half dimensions of the game object.
Definition: PlayerShip.cpp:175
PlayerShip(const uint8_t playerIndex)
Instantiate a player ship object.
Definition: PlayerShip.cpp:19