offset spawning of gladiator to avoid stacking
This commit is contained in:
parent
ef113a6a43
commit
facb2b51fe
@ -45,7 +45,9 @@ public class Arena : MonoBehaviour {
|
||||
|
||||
var gladiator = Instantiate(entityPrefab, gladiatorParent).GetComponent<Gladiator>();
|
||||
gladiator.arena = this;
|
||||
gladiator.transform.position = spawners[spawnerIndex].position;
|
||||
float randFloat = Random.Range(0.1f, 0.5f);
|
||||
Vector2 offset = new Vector2(randFloat, randFloat);
|
||||
gladiator.transform.position = spawners[spawnerIndex].position + offset;
|
||||
gladiator.direction = spawners[spawnerIndex].direction;
|
||||
gladiator.gameFlowManager = gameFlowManager;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user