Example #1
0
    private ObstacleController AddObstacleToPool()
    {
        ObstacleController newObstacle = Instantiate(obstaclePrefab, transform).GetComponent <ObstacleController>();

        newObstacle.Initialize();
        obstaclePool.Add(newObstacle);

        return(newObstacle);
    }