예제 #1
0
 public void OnAccel(UnityEngine.InputSystem.InputValue input)
 {
     instructions.gameObject.SetActive(false);
     accel = input.Get <float>();
     foreach (var system in bigExplosion)
     {
         if (accel > 0 && healthText.text != string.Empty)
         {
             system.Play(false);
         }
         else
         {
             system.Stop();
         }
     }
 }
예제 #2
0
 void OnCrouch(UnityEngine.InputSystem.InputValue inputValue)
 {
     this.crouch = inputValue.isPressed;
 }
예제 #3
0
 void OnJump(UnityEngine.InputSystem.InputValue inputValue)
 {
     this.jump = true;
     animator.SetBool("IsJumping", true);
 }
예제 #4
0
 void OnMove(UnityEngine.InputSystem.InputValue inputValue)
 {
     this.moveVector = inputValue.Get <Vector2>();
     animator.SetFloat("Speed", Mathf.Abs(moveVector.x));
 }
예제 #5
0
 public void OnTurn(UnityEngine.InputSystem.InputValue input) => vector = input.Get <Vector2>();
예제 #6
0
 public void OnBomb(UnityEngine.InputSystem.InputValue input) => MakeBullet(mine, mine.transform.position, 2 * new Vector2(Random.Range(-1f, 1f), Random.Range(-1f, 1f)).normalized);
예제 #7
0
 public void OnFire(UnityEngine.InputSystem.InputValue input) => firing = input.Get <float>();