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); }