Update Increase Pastie Spawn Range & Bullet Delete

This commit is contained in:
Philip W 2021-11-01 21:17:37 +00:00
parent aeae818f80
commit 54446d676b
2 changed files with 2 additions and 2 deletions

View File

@ -47,7 +47,7 @@ public class TimedSelfDestructWithTimerOrShootToReturn : MonoBehaviour
if (objectTag == "Bullet")
{
GameObject.Find("CollisionDetector").GetComponent<ItemStash>().AddDroppedItemAmountByOne();
Destroy(other);
Destroy(other.gameObject);
Destroy(gameObject);
}
}

View File

@ -62,7 +62,7 @@ public class EnemyReturn : Physics2DObject
if (hasDroppableObject)
{
GameObject newDroppedObject = Instantiate<GameObject>(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);
}