2
0

FollowActor.h 887 B

12345678910111213141516171819202122232425262728293031
  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 FollowActor : public Actor
  11. {
  12. public:
  13. FollowActor(class Game* game);
  14. void ActorInput(const uint8_t* keys) override;
  15. void SetVisible(bool visible);
  16. void LoadProperties(const rapidjson::Value& inObj) override;
  17. void SaveProperties(rapidjson::Document::AllocatorType& alloc,
  18. rapidjson::Value& inObj) const override;
  19. TypeID GetType() const override { return TFollowActor; }
  20. private:
  21. class MoveComponent* mMoveComp;
  22. class FollowCamera* mCameraComp;
  23. class SkeletalMeshComponent* mMeshComp;
  24. bool mMoving;
  25. };