Example #1
0
 private void UpdateButtonInput()
 {
     if (Input.GetButton("ButtonA"))
     {
         m_fighting.WaterShot();
         EnableShootingAnimation();
     }
     else if (Input.GetButtonDown("ButtonY"))
     {
         bool canAnimate = m_fighting.LightningShot();
         if (canAnimate)
         {
             EnableLightningShootingAnimation();
         }
     }
     else if (Input.GetButton("ButtonX"))
     {
         m_fighting.EnableFreezing();
         EnableShootingAnimation();
     }
     else if (Input.GetButtonUp("ButtonX"))
     {
         m_fighting.DisableFreezing();
         EnableIdleAnimation();
     }
     else
     {
         if (m_hasLightning)
         {
             return;
         }
         else
         {
             EnableIdleAnimation();
         }
     }
 }