Example #1
0
 public void pressedAttack()
 {
     //Debug.Log("Trying to attack");
     MessageSystem.instance.triggerEventCall("MeleeAttack");
     if (!heroInventory.isOpeningInventory)
     {
         if (heroAttack == null)
         {
             heroAttack = GameObject.FindObjectOfType <HeroMeleeButton>();
         }
         heroAttack.doAttack();
         //Debug.Log("Attacked");
         //else
     }
     //Debug.Log("Successful to attack");
 }
Example #2
0
 // Use this for initialization
 void Start()
 {
     heroAttack    = GameObject.FindObjectOfType <HeroMeleeButton>();
     heroInventory = FindObjectOfType <AndroidInventoryScript>();
 }