2
0

Ship.h 626 B

1234567891011121314151617181920212223
  1. // ----------------------------------------------------------------
  2. // From Game Programming in C++ by Sanjay Madhav
  3. // Copyright (C) 2017 Sanjay Madhav. All rights reserved.
  4. //
  5. // Released under the BSD License
  6. // See LICENSE in root directory for full details.
  7. // ----------------------------------------------------------------
  8. #pragma once
  9. #include "Actor.h"
  10. class Ship : public Actor
  11. {
  12. public:
  13. Ship(class Game* game);
  14. void UpdateActor(float deltaTime) override;
  15. void ActorInput(const struct InputState& state) override;
  16. private:
  17. Vector2 mVelocityDir;
  18. Vector2 mRotationDir;
  19. float mSpeed;
  20. float mLaserCooldown;
  21. };