Game Development Reference
In-Depth Information
The code for Ship.h is as follows:
typedef enum
{
Up,
Down,
Left,
Right
} ShipDirection;
class Ship abstract
{
protected:
XMFLOAT2 _position;
float _rotation;
XMFLOAT2 _scale;
std::shared_ptr<Sprite> _sprite;
void LoadTexture(std::wstring &path);
int _health;
float _speed;
bool _isAlive;
public:
Ship(void);
~Ship(void);
void Move(ShipDirection direction, float
deltaTime);
void MoveTo(float x, float y);
void Damage(int amount);
bool GetIsAlive();
void SetIsAlive(bool value);
void Reset();
Search WWH ::




Custom Search