示例#1
0
 void ShootSkill()
 {
     if (gamepad.GetButtonADown())
     {
         anim.SetTrigger("Skill");
         GameObject ball = Instantiate(BallPrefab, ShootPoint.position, Quaternion.identity) as GameObject;
         ball.GetComponent <Rigidbody>().velocity = -transform.forward * ShootSpeed;
         isHaveBall = false;
         GameStateManager.SetCurrentState(PlayingState.Instance);
     }
 }
示例#2
0
    void PressABtn()
    {
        if (pad.GetButtonADown())
        {
            switch ((int)iconState)
            {
            case 0:
                GameStateManager.SetCurrentState(ReadyState.Instance);
                PlayingTotalUI.SetActive(true);
                TitleTotalUI.SetActive(false);
                break;

            case 1:
                CreatorList.SetActive(true);
                CreatorList.GetComponent <CreatorList>().pad = pad;
                Title.SetActive(false);
                Option.SetActive(false);
                break;

            case 2:
                Application.Quit();
                break;
            }
        }
    }
示例#3
0
 void Shoot()
 {
     if (gamepad.GetButtonADown())
     {
         {
             CancelInvoke();
             AutoShoot();
         }
     }
 }
示例#4
0
 void ListenToBtnA()
 {
     if (null != pad)
     {
         if (pad.GetButtonADown())
         {
             Title.SetActive(true);
             Option.SetActive(true);
             icon.pad       = pad;
             icon.iconState = IconState.Start;
             gameObject.SetActive(false);
         }
     }
 }