1
This commit is contained in:
parent
be78c86650
commit
0dff30fbe6
@ -3,6 +3,7 @@
|
||||
#include "target_agent.h"
|
||||
|
||||
#include "mt/Hero.h"
|
||||
#include "mt/Equip.h"
|
||||
|
||||
TargetAgent::TargetAgent():BaseAgent()
|
||||
{
|
||||
@ -85,3 +86,11 @@ Room* TargetAgent::GetRoom()
|
||||
{
|
||||
return owner_->room;
|
||||
}
|
||||
|
||||
float TargetAgent::GetShotRange()
|
||||
{
|
||||
if (target_.Get() && target_.Get()->GetCurrWeapon()) {
|
||||
return target_.Get()->GetCurrWeapon()->meta->range();
|
||||
}
|
||||
return 0.0f;
|
||||
}
|
||||
|
@ -21,6 +21,7 @@ public:
|
||||
float GetMaxHp();
|
||||
int GetHeroId();
|
||||
int GetLevel();
|
||||
float GetShotRange();
|
||||
void Abandon();
|
||||
|
||||
void SetOwner(Creature* owner);
|
||||
|
Loading…
x
Reference in New Issue
Block a user