Exemplo n.º 1
0
    IEnumerator ChangeAnimIEnumerator(CheerState state)
    {
        switch (state)
        {
        case CheerState.Score:



        case CheerState.AntiScore:
            ChangeAnim(state);
            yield return(new WaitForSeconds(2.5f));

            ChangeAnim(CheerState.Normal);

            break;

        case CheerState.Normal:



        case CheerState.Win:



        case CheerState.Lose:
            ChangeAnim(state);

            break;

        default:

            break;
        }
        yield return(null);
    }
Exemplo n.º 2
0
    void ChangeAnim(CheerState state)
    {
        int stateOfMotion = Random.Range(0, 3);

        foreach (var mechanimController in SQuerySDMecanimControllers)
        {
            switch (state)
            {
            case CheerState.Normal:
                mechanimController.ChangeAnimation(QuerySDMecanimController.QueryChanSDAnimationType.NORMAL_IDLE);

                break;

            case CheerState.Score:
                mechanimController.
                ChangeAnimation(
                    // if
                    stateOfMotion == 1 ?
                    // then
                    QuerySDMecanimController.
                    QueryChanSDAnimationType.NORMAL_ITEMGET :
                    // else
                    QuerySDMecanimController.
                    QueryChanSDAnimationType.OSAKA_CLAP);

                break;

            case CheerState.AntiScore:
                mechanimController.ChangeAnimation(QuerySDMecanimController.QueryChanSDAnimationType.NORMAL_DAMAGE);

                break;

            case CheerState.Lose:
                mechanimController.ChangeAnimation(QuerySDMecanimController.QueryChanSDAnimationType.NORMAL_LOSE);

                break;

            case CheerState.Win:
                mechanimController.ChangeAnimation(QuerySDMecanimController.QueryChanSDAnimationType.NORMAL_WIN);

                break;

            default:

                break;
            }
        }
    }
Exemplo n.º 3
0
 void ChangeAnimation(CheerState state)
 {
     I.StartCoroutine(I.ChangeAnimIEnumerator(state));
 }