Пример #1
0
    //---------------END OF THE BUSINESS------------------

    public void TriggerDrop(DropColor color, int dropLength)
    {
        bool canYouDrop;

        Debug.Log("Recieved request to Trigger the Drop!");
        //gotta check if the timing is right, can't trigger the drop in the middle of groove or another drop
        if (!tutorialPreventingDrop)
        {
            switch (currentState)
            {
            case MusicState.Windup:
            case MusicState.Filler:
                canYouDrop = true;
                //Debug.Log("Drop should be a-ok to proceed!");
                break;

            default:
                canYouDrop = false;
                Debug.Log("The form is preventing you from dropping!");

                break;
            }
        }
        else
        {
            canYouDrop = false;

            Debug.Log("The tutorial is preventing you from dropping!");
        }

        //if you can drop, do it, otherwise you cant
        if (canYouDrop)
        {
            nextDropLength = dropLength;



            colorOfDrop = color;
            nextState   = MusicState.Drop;
            Debug.Log("Drop incoming! Color is: " + color);
            nextStateText.text = "Next State: DROP";

            //and broadcast the reception of the drop gesture
            DropGestureRecieved?.Invoke();
        }
        else
        {
            Debug.Log("You can't drop it yet!");
        }
    }
Пример #2
0
 public void DropGestureRecievedCall()
 {
     DropGestureRecieved?.Invoke();
     Debug.Log("DropGestureRecieved!");
 }