Ejemplo n.º 1
0
 public override TaskStatus OnUpdate()
 {
     if (Global.instance.m_Hero_01 != null && m_Enemy.PublicGetCurAtkTarget() != null)
     {
         float distance = Vector3.Distance(m_Enemy.PublicGetCurAtkTarget().transform.position, transform.position);
         if (distance < viewDistance.Value)
         {
             //  m_BehaviorTree.SetVariableValue("target",targetList.Value[0]);
             m_BehaviorTree.SetVariableValue("target", m_Enemy.PublicGetCurAtkTarget().transform);
             return(TaskStatus.Success);
         }
     }
     return(TaskStatus.Failure);
 }