Beispiel #1
0
    private void SpawnPlayer(PlayerCharacterController p)
    {
        int           remainingUnusedSpawners = unallocatedSpawners.Count;
        int           randomSpawnIndex        = Random.Range(0, remainingUnusedSpawners);
        PlayerSpawner spawner = unallocatedSpawners[randomSpawnIndex];

        unallocatedSpawners.Remove(spawner);
        spawner.SetSpawnObject(p.GetShopkin().gameObject);
        spawner.Spawn();
    }