38 lines
734 B
C++
38 lines
734 B
C++
#pragma once
|
|
|
|
#include "base_agent.h"
|
|
|
|
#include "creature.h"
|
|
|
|
class TargetAgent : public BaseAgent
|
|
{
|
|
public:
|
|
TargetAgent();
|
|
|
|
virtual ~TargetAgent() override;
|
|
|
|
BEHAVIAC_DECLARE_AGENTTYPE(TargetAgent, BaseAgent)
|
|
|
|
int GetUniId();
|
|
bool IsValid();
|
|
bool IsDead();
|
|
glm::vec3 GetPos();
|
|
float GetHp();
|
|
float GetMaxHp();
|
|
int GetHeroId();
|
|
int GetLevel();
|
|
void Abandon(int min_time, int max_time);
|
|
float GetShotRange();
|
|
void ClearAbandon();
|
|
float GetHPRate();
|
|
bool HasBuffEffect(int effect_id);
|
|
|
|
void SetOwner(Creature* owner);
|
|
void SetTarget(Creature* target);
|
|
virtual Room* GetRoom() override;
|
|
|
|
private:
|
|
CreatureWeakPtr target_;
|
|
Creature* owner_ = nullptr;
|
|
};
|