refactor(Core/Movement): follower management of references (#25060)
Co-authored-by: Shauren <shauren.trinity@gmail.com>
This commit is contained in:
@@ -18,8 +18,6 @@
|
||||
#ifndef ACORE_ABSTRACTFOLLOWER_H
|
||||
#define ACORE_ABSTRACTFOLLOWER_H
|
||||
|
||||
#include "FollowerReference.h"
|
||||
|
||||
class Unit;
|
||||
|
||||
class AbstractFollower
|
||||
@@ -29,15 +27,10 @@ public:
|
||||
virtual ~AbstractFollower() { SetTarget(nullptr); }
|
||||
|
||||
void SetTarget(Unit* unit);
|
||||
Unit* GetTarget() const { return _target; }
|
||||
bool IsTargetValid() const { return i_target.isValid(); }
|
||||
|
||||
virtual void stopFollowing() { }
|
||||
[[nodiscard]] Unit* GetTarget() const { return _target; }
|
||||
|
||||
private:
|
||||
Unit* _target = nullptr;
|
||||
|
||||
protected:
|
||||
FollowerReference i_target;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user