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(); } } }
void OnCrouch(UnityEngine.InputSystem.InputValue inputValue) { this.crouch = inputValue.isPressed; }
void OnJump(UnityEngine.InputSystem.InputValue inputValue) { this.jump = true; animator.SetBool("IsJumping", true); }
void OnMove(UnityEngine.InputSystem.InputValue inputValue) { this.moveVector = inputValue.Get <Vector2>(); animator.SetFloat("Speed", Mathf.Abs(moveVector.x)); }
public void OnTurn(UnityEngine.InputSystem.InputValue input) => vector = input.Get <Vector2>();
public void OnBomb(UnityEngine.InputSystem.InputValue input) => MakeBullet(mine, mine.transform.position, 2 * new Vector2(Random.Range(-1f, 1f), Random.Range(-1f, 1f)).normalized);
public void OnFire(UnityEngine.InputSystem.InputValue input) => firing = input.Get <float>();