예제 #1
0
    /// <summary>
    /// Method is activated when the ball leaves display (bottom)
    /// It adds/removes an "operation" ball
    /// </summary>
    private void DestroyBall(int operation, bool InstantiateNewBall = true)
    {
        //Informs about the ball is out
        ballManager.HandleBallOut(operation, InstantiateNewBall);

        //Destroy this ball
        Destroy(gameObject);

        //play destroy ball
        AudioManager.Play(AudioClipName.BallLost);
    }