From 54446d676bda7343b7977ef9544ef64c37aae6c9 Mon Sep 17 00:00:00 2001 From: Philip White Date: Mon, 1 Nov 2021 21:17:37 +0000 Subject: [PATCH] Update Increase Pastie Spawn Range & Bullet Delete --- .../Gameplay/TimedSelfDestructWithTimerOrShootToReturn.cs | 2 +- Unity-Files/Assets/Scripts/Movement/EnemyReturn.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Unity-Files/Assets/Scripts/Gameplay/TimedSelfDestructWithTimerOrShootToReturn.cs b/Unity-Files/Assets/Scripts/Gameplay/TimedSelfDestructWithTimerOrShootToReturn.cs index a2dbfa2..fc9c43d 100644 --- a/Unity-Files/Assets/Scripts/Gameplay/TimedSelfDestructWithTimerOrShootToReturn.cs +++ b/Unity-Files/Assets/Scripts/Gameplay/TimedSelfDestructWithTimerOrShootToReturn.cs @@ -47,7 +47,7 @@ public class TimedSelfDestructWithTimerOrShootToReturn : MonoBehaviour if (objectTag == "Bullet") { GameObject.Find("CollisionDetector").GetComponent().AddDroppedItemAmountByOne(); - Destroy(other); + Destroy(other.gameObject); Destroy(gameObject); } } diff --git a/Unity-Files/Assets/Scripts/Movement/EnemyReturn.cs b/Unity-Files/Assets/Scripts/Movement/EnemyReturn.cs index 10515ca..72e51bf 100644 --- a/Unity-Files/Assets/Scripts/Movement/EnemyReturn.cs +++ b/Unity-Files/Assets/Scripts/Movement/EnemyReturn.cs @@ -62,7 +62,7 @@ public class EnemyReturn : Physics2DObject if (hasDroppableObject) { GameObject newDroppedObject = Instantiate(droppedObject); - newDroppedObject.transform.position = new Vector2(Random.Range(0, 1) + this.transform.position.x, Random.Range(0, 1) + this.transform.position.y); + newDroppedObject.transform.position = new Vector2(Random.Range(0, 2) + this.transform.position.x, Random.Range(0, 2) + this.transform.position.y); } Destroy(gameObject); }