diff --git a/Assets/Scripts/Game.cs b/Assets/Scripts/Game.cs index 4d8ca1d..00936bd 100644 --- a/Assets/Scripts/Game.cs +++ b/Assets/Scripts/Game.cs @@ -152,13 +152,9 @@ private void Update() if (_itemSpawn <= 0) { _itemSpawn = ItemSpawnTime; - AddMessage("New Item"); - - for (var i = 0; i < ItemPositions.Length; i++) - { - Instantiate(Item, ItemPositions[i], Quaternion.Euler(Vector3.zero)); - } - // Instantiate(Item, GetRandomItemPosition(), Quaternion.Euler(Vector3.zero)); + AddMessage("New Boost Item"); + + Instantiate(Item, GetRandomItemPosition(), Quaternion.Euler(Vector3.zero)); } } diff --git a/Assets/Scripts/Player.cs b/Assets/Scripts/Player.cs index 968ce6e..e50d0f1 100644 --- a/Assets/Scripts/Player.cs +++ b/Assets/Scripts/Player.cs @@ -391,7 +391,6 @@ private void Update() Rigidbody.AddForce(new Vector3(0, JumpFactor * JumpSpeed, 0)); animator.SetBool("jumping", true); - } if (Input.GetButtonDown("B " + (int)InputType) && !isRespawning) @@ -399,7 +398,7 @@ private void Update() Shoot(); } animator.SetBool("roll", false); - if (Input.GetButtonDown("X " + (int)InputType) && !isRespawning) + if (_onGround && Input.GetButtonDown("X " + (int)InputType) && !isRespawning) {