Ratbots now spawn around player instead of around (0, 0)

This commit is contained in:
2024-10-27 19:16:35 -07:00
parent 0865da7870
commit 719ecf18aa

View File

@@ -52,7 +52,11 @@ public class GameState : MonoBehaviour
for (uint _ = 0; _ <= wave; _++) { for (uint _ = 0; _ <= wave; _++) {
GameObject newRatbot = Instantiate( GameObject newRatbot = Instantiate(
SpawnRatbot(), SpawnRatbot(),
Random.insideUnitCircle.normalized*20, Random.insideUnitCircle.normalized*20
+ new Vector2 (
playerPosition.x,
playerPosition.y
),
Quaternion.identity Quaternion.identity
); );
newRatbot.GetComponent<Ratbot>().damageStrength newRatbot.GetComponent<Ratbot>().damageStrength