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; _++) {
GameObject newRatbot = Instantiate(
SpawnRatbot(),
Random.insideUnitCircle.normalized*20,
Random.insideUnitCircle.normalized*20
+ new Vector2 (
playerPosition.x,
playerPosition.y
),
Quaternion.identity
);
newRatbot.GetComponent<Ratbot>().damageStrength