Esempio n. 1
0
 void OnFirstTouchBegan()
 {
     switch (buttonType)
     {
     case type.JumpButton:
         if (playerObj.GetComponent <AnimationsManager>().onGround)
         {
             playerRigidBody.AddForce(Vector2.up * jumpHeight, ForceMode2D.Impulse);
         }
         break;
     }
     switch (buttonType)
     {
     case type.ShieldButton:
         animManager.Shield();    //currently does nothing
         break;
     }
     switch (buttonType)
     {
     case type.Punch_01:
         animManager.PunchSkill();
         break;
     }
     switch (buttonType)
     {
     case type.Kick_01:
         animManager.KickSkill();
         break;
     }
     switch (buttonType)
     {
     case type.EnergyBow_01:
         animManager.ArrowSkill();
         break;
     }
     switch (buttonType)
     {
     case type.Cast_01:
         animManager.Cast_01();
         break;
     }
 }