Beispiel #1
0
    private void OnStatusChange(BarySenGameStatus status)
    {
        switch (status)
        {
        case BarySenGameStatus.TITLE:
            OnChangeToTitle.Invoke();
            Debug.Log("status is changed to TITLE");
            break;

        case BarySenGameStatus.GAME:
            OnChangeToGame.Invoke();
            Debug.Log("status is changed to GAME");
            break;

        case BarySenGameStatus.RESULT:
            OnChangeToResult.Invoke();
            Debug.Log("status is changed to RESULT");
            break;

        case BarySenGameStatus.CREDIT:
            OnChangeToCredit.Invoke();
            Debug.Log("status is changed to CREDIT");
            break;
        }
    }
Beispiel #2
0
    private void checkStatus()
    {
        if (CurrentStatus == _beforeStatus)
        {
            return;
        }

        OnStatusChange(CurrentStatus);
        _beforeStatus = CurrentStatus;
    }