Esempio n. 1
0
 public void Changed(int changenum)
 {
     if (changenum == 1)
     {
         //save = false;
         attacking = true;
         UnitStatus status = GetComponent <UnitStatus>();
         if (status == null)
         {
             swich.Attack = false;
             swich.Cure   = true;
         }
         if (line != null)
         {
             line.enabled = false;
         }
         attackMode.Attack();
     }
     else if (changenum == 2)
     {
         //save = false;
         attacking = false;
         UnitStatus status = GetComponent <UnitStatus>();
         if (status == null)
         {
             swich.Attack = true;
             swich.Cure   = false;
         }
         if (line != null)
         {
             line.enabled = true;
         }
         healMode.Heal();
     }
     Debug.Log("name = " + gameObject.name + ", num = " + changenum);
 }