Example #1
0
    void Start()
    {
        EventManager.AddBallSpawnerListner(SpawnBall);

        minD    = ConfigurationUtils.minDelay;
        maxD    = ConfigurationUtils.maxDelay;
        spawnBT = gameObject.AddComponent <Timer> ();

        TempBall();   // Create a temporary ball to get its dimension, the dimesion is used to avoid overlaping of ball spawn at same location

        SpawnBall();  // Spawn the first ball at the start of the game

        spawnTimer(); // Start the timer to spawn the next ball
    }