Esempio n. 1
0
    void SpawnEnemy(EnemyController controller)
    {
        int[]           temp     = new int[] { -1, 0, 1 };
        GroundTile      last     = _spawnedGroundTiles[_spawnedGroundTiles.Count / 2];
        int             lane     = last.GetRandomLane();
        Vector3         spawnPos = last.GetRandomLanePosition(lane);
        EnemyController go       = Instantiate(controller, spawnPos, Quaternion.identity, _enemyGroup);

        go.CurrentLane = lane;
        _spawnedEnemies.Add(go);
    }