FPSActor.h 839 B

1234567891011121314151617181920212223242526272829303132
  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. #include "SoundEvent.h"
  11. class FPSActor : public Actor
  12. {
  13. public:
  14. FPSActor(class Game* game);
  15. void UpdateActor(float deltaTime) override;
  16. void ActorInput(const uint8_t* keys) override;
  17. void SetFootstepSurface(float value);
  18. void SetVisible(bool visible);
  19. private:
  20. class MoveComponent* mMoveComp;
  21. class AudioComponent* mAudioComp;
  22. class MeshComponent* mMeshComp;
  23. class FPSCamera* mCameraComp;
  24. class Actor* mFPSModel;
  25. SoundEvent mFootstep;
  26. float mLastFootstep;
  27. };