human add movement
This commit is contained in:
parent
7515adebae
commit
d52daccd94
@ -15,6 +15,7 @@
|
||||
#include "app.h"
|
||||
#include "roommgr.h"
|
||||
#include "android.h"
|
||||
#include "movement.h"
|
||||
|
||||
#include "framework/cpp/utils.h"
|
||||
#include "framework/cpp/httpclientpool.h"
|
||||
@ -50,6 +51,8 @@ Human::Human():Entity()
|
||||
|
||||
Human::~Human()
|
||||
{
|
||||
delete movement ;
|
||||
movement = nullptr;
|
||||
}
|
||||
|
||||
void Human::Initialize()
|
||||
@ -59,6 +62,8 @@ void Human::Initialize()
|
||||
RecalcSelfCollider();
|
||||
volume_ = meta->volume;
|
||||
observers_.insert(this);
|
||||
movement = new MovementComponent();
|
||||
movement->owner = this;
|
||||
}
|
||||
|
||||
float Human::GetSpeed()
|
||||
|
@ -30,6 +30,7 @@ enum HumanStatus
|
||||
struct xtimer_list;
|
||||
class CircleCollider;
|
||||
class Obstacle;
|
||||
class MovementComponent;
|
||||
class Human : public Entity
|
||||
{
|
||||
public:
|
||||
@ -219,6 +220,7 @@ protected:
|
||||
std::set<Human*> observers_;
|
||||
Human* follow_target_ = nullptr;
|
||||
bool follow_synced_active_player = false;
|
||||
MovementComponent* movement = nullptr;
|
||||
|
||||
private:
|
||||
CircleCollider* self_collider_ = nullptr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user