Exemplo n.º 1
0
 public GoToAggresive(AgentUnit agent, Vector3 target, float rangeRadius, Action <bool> callback) : base(agent, callback)
 {
     this.target     = target;
     this.defendZone = new DefendZone(agent, agent.position, rangeRadius, (_) => { });
     this.fighting   = false;
     this.goTo       = new GoTo(agent, target, (bool result) => {
         goTo.Terminate();
         goTo = null;
     });
 }
Exemplo n.º 2
0
    public RestoreHealth(AgentUnit agent, Action <bool> callback) : base(agent, callback)
    {
        healingPoint = Info.GetClosestHealingPoint(agent.position, 150f).position;

        this.goTo = new GoTo(agent, healingPoint, Mathf.Infinity, 0, true, (bool success) => {
            goTo.Terminate();
            goTo       = null;
            defendZone = new DefendZone(agent, agent.position, 2f, (_) => {
            });
        });
    }