1
This commit is contained in:
parent
89aa344e9c
commit
aa13b56d2a
@ -90,6 +90,12 @@ void MoveableEntity::SetMoveDir(const a8::Vec2& move_dir)
|
||||
++chg_move_dir_times_;
|
||||
}
|
||||
|
||||
void MoveableEntity::SetTargetPos(const a8::Vec3& target_pos)
|
||||
{
|
||||
target_pos_ = target_pos;
|
||||
++chg_target_pos_times_;
|
||||
}
|
||||
|
||||
void MoveableEntity::SetAttackDir(const a8::Vec2& attack_dir)
|
||||
{
|
||||
attack_dir_ = attack_dir;
|
||||
|
@ -26,12 +26,15 @@ class MoveableEntity : public RoomEntity
|
||||
virtual void UpdateCharImage(const char* file, int line, const char* func);
|
||||
virtual const a8::Vec2& GetMoveDir() { return move_dir_; };
|
||||
virtual void SetMoveDir(const a8::Vec2& move_dir);
|
||||
virtual const a8::Vec3& GetTargetPos() { return target_pos_; };
|
||||
virtual void SetTargetPos(const a8::Vec3& target_pos);
|
||||
virtual const a8::Vec2& GetAttackDir() { return attack_dir_; };
|
||||
virtual void SetAttackDir(const a8::Vec2& attack_dir);
|
||||
virtual const a8::Vec2& GetShotDir() { return attack_dir_; };
|
||||
int GetChgMoveDirTimes() { return chg_move_dir_times_; }
|
||||
int GetChgAttackDirTimes() { return chg_attack_dir_times_; }
|
||||
float GetAttackDirRotate();
|
||||
int GetChgTargetPosTimes() { return chg_target_pos_times_; }
|
||||
|
||||
protected:
|
||||
int updated_times_ = 0;
|
||||
@ -39,7 +42,9 @@ protected:
|
||||
private:
|
||||
a8::Vec2 move_dir_;
|
||||
a8::Vec2 attack_dir_;
|
||||
a8::Vec3 target_pos_;
|
||||
std::set<GridCell*> grid_list_;
|
||||
int chg_move_dir_times_ = 0;
|
||||
int chg_attack_dir_times_ = 0;
|
||||
int chg_target_pos_times_ = 0;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user