Ejemplo n.º 1
0
    void Start()
    {
        StartCoroutine(BallCoroutine());
        rigidBody2D = GetComponent <Rigidbody2D>();

        timer          = gameObject.AddComponent <Timer>();
        timer.Duration = ConfigurationUtils.BallAliveTime;

        speedupTimer          = gameObject.AddComponent <Timer>();
        speedupTimer.Duration = ConfigurationUtils.SpeedupEffectDuration;
        // New spawns
        ballSpawner = Camera.main.GetComponent <BallSpawner>();

        EventManager.AddBallsInvoker(this);
        EventManager.AddPickupEffectListener(SpeedupEffectBehaviour);
    }