예제 #1
0
 public void AddMember(RSchmit.AI member)
 {
     if (!members.Contains(member))
     {
         members.Add(member);
     }
 }
예제 #2
0
 public Unit(GameObject target, RSchmit.AI member)
 {
     this.target = target;
     members     = new List <RSchmit.AI>();
     members.Add(member);
     attackList = new AttackList();
 }
예제 #3
0
 public void Remove(RSchmit.AI ai)
 {
     if (attackers.Contains(ai))
     {
         attackers.Remove(ai);
     }
 }
예제 #4
0
 public void Add(RSchmit.AI ai)
 {
     if (!attackers.Contains(ai))
     {
         attackers.Add(ai);
     }
 }
예제 #5
0
 public RSchmit.AI Pop()
 {
     RSchmit.AI top = null;
     if (attackers.Count > 0)
     {
         top = attackers[0];
         attackers.RemoveAt(0);
     }
     return(top);
 }
예제 #6
0
 public void Attack()
 {
     if (attackList.Peek() != null && attackList.Count > 0 && attackList.Peek().currentAction == actionType.ATTACK_FINISH)
     {
         RSchmit.AI ai = attackList.Pop();
         ai.Attack();
     }
     else
     {
         attackList.Pop();
     }
 }
예제 #7
0
    public void AddToUnit(RSchmit.AI member)
    {
        bool added = false;

        foreach (Unit u in units)
        {
            if (u.target == member.m_target)
            {
                u.AddMember(member.GetComponent <RSchmit.AI>());
                added = true;
                break;
            }
        }
        if (!added)
        {
            units.Add(new Unit(member.m_target, member.GetComponent <RSchmit.AI>()));
        }
    }
예제 #8
0
 void Start()
 {
     m_healthBar = GetComponentInChildren <HealthBar>();
     m_animator  = GetComponent <Animator>();
     AI          = GetComponent <RSchmit.AI>();
 }