Exemplo n.º 1
0
 private void Start()
 {
     //Set starting values
     actualBallsLeft = ConfigurationUtils.AmountBalls;
     SetBallsLeft(actualBallsLeft);
     AddScore(-actualScore);
     //Become listener to add points
     EventsManager.AddPointsListener(AddScore);
     //Become listener to reduce balls left
     EventsManager.AddReduceBallsLeftListener(RemoveBallFromLeft);
     //Become invoker for LastBallLost
     EventsManager.AddLastBallLostInvoker(lastBallLost);
 }
Exemplo n.º 2
0
    bool respawnAfterBallLeavesScene     = true; //used only if respawnAfterAnyDisappearingBall == false;

    private void Start()
    {
        SaveSpawnLocation();
        StartCoroutine(AutoSpawner());
        //BecomeListener
        if (respawnAfterAnyDisappearingBall)
        {
            EventsManager.AddDisappearingBallListener(SpawnBallWithSomeWaiting);
        }
        else if (respawnAfterBallLeavesScene)
        {
            EventsManager.AddReduceBallsLeftListener(SpawnBallWithSomeWaiting);
        }
    }