コード例 #1
0
ファイル: Screen_Intro.cs プロジェクト: ChoiHanMin/Portfolio
    public void NextMyMaterial()
    {
        switch (GameState)
        {
        case (int)EGameState.Start:
            if (NextMat < MySprite.Length && NextMat < 5)
            {
                NowMat.SetTexture("_MainTex", MySprite[NextMat]);
                GetComponent <MeshRenderer>().material = NowMat;
            }

            break;

        case (int)EGameState.Win:
            if (NextMat < MyWinSprite.Length && NextMat < 2)
            {
                NowMat.SetTexture("_MainTex", MyWinSprite[NextMat]);
                GetComponent <MeshRenderer>().material = NowMat;
            }
            else
            {
                MyTween.DOKill();
            }
            break;

        case (int)EGameState.Lose:
            if (NextMat < MyLoseSprite.Length && NextMat < 1)
            {
                NowMat.SetTexture("_MainTex", MyLoseSprite[NextMat]);
                GetComponent <MeshRenderer>().material = NowMat;
            }
            else
            {
                MyTween.DOKill();
            }
            break;
        }
        NextMat++;
    }
コード例 #2
0
    protected override void CustomPlayFeedback(Vector3 position, float feedbacksIntensity = 1.0f)
    {
        switch (Mode)
        {
        case Modes.DOPlay:
            TargetDOTweenAnimation.DOPlay();
            break;

        case Modes.DOPlayBackwards:
            TargetDOTweenAnimation.DOPlayBackwards();
            break;

        case Modes.DOPlayForward:
            TargetDOTweenAnimation.DOPlayForward();
            break;

        case Modes.DOPause:
            TargetDOTweenAnimation.DOPause();
            break;

        case Modes.DOTogglePause:
            TargetDOTweenAnimation.DOTogglePause();
            break;

        case Modes.DORewind:
            TargetDOTweenAnimation.DORewind();
            break;

        case Modes.DORestart:
            TargetDOTweenAnimation.DORestart();
            break;

        case Modes.DOComplete:
            TargetDOTweenAnimation.DOComplete();
            break;

        case Modes.DOKill:
            TargetDOTweenAnimation.DOKill();
            break;
        }
    }