CameraActor.h 809 B

1234567891011121314151617181920212223242526272829
  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 CameraActor : public Actor
  12. {
  13. public:
  14. CameraActor(class Game* game);
  15. void UpdateActor(float deltaTime) override;
  16. void ActorInput(const uint8_t* keys) override;
  17. void SetFootstepSurface(float value);
  18. const Vector3& GetCameraPosition() const { return mCameraPos; }
  19. private:
  20. class MoveComponent* mMoveComp;
  21. class AudioComponent* mAudioComp;
  22. Vector3 mCameraPos;
  23. SoundEvent mFootstep;
  24. float mLastFootstep;
  25. };