コード例 #1
0
ファイル: EthanScorekeeper.cs プロジェクト: zhixu/live2DTest
    public void addPoint()
    {
        Color color = maru.GetComponent <SpriteRenderer>().color;

        color.a = 1;
        maru.GetComponent <SpriteRenderer> ().color = color;

        points++;
        totalQuestionsSoFar++;
        updatePercentage();

        appModel.turnOffMouseTracking();
        appModel.setExpression("idle");

        if (percentage >= 70)
        {
            appModel.startMotion("thumbs up", 0, LAppDefine.PRIORITY_NORMAL);
            StartCoroutine(displayReaction(3f));
        }
        else
        {
            appModel.startMotion("happy", 0, LAppDefine.PRIORITY_NORMAL);
            StartCoroutine(displayReaction(3.5f));
        }
    }
コード例 #2
0
ファイル: Scorekeeper.cs プロジェクト: zhixu/live2DTest
    public void addPoint()
    {
        Color color = maru.GetComponent <SpriteRenderer>().color;

        color.a = 1;
        maru.GetComponent <SpriteRenderer>().color = color;

        points++;
        totalQuestionsSoFar++;
        updatePercentage();

        appModel.turnOffMouseTracking();

        if (string.Equals(avatar, "shizuku"))
        {
            appModel.setExpression("default");
            if (percentage == 100)
            {
                appModel.startMotion("100 percent", 0, LAppDefine.PRIORITY_NORMAL);
                StartCoroutine(displayReaction(4.0f));
            }
            else if (percentage >= 70)
            {
                appModel.startMotion("happy", 0, LAppDefine.PRIORITY_NORMAL);
                StartCoroutine(displayReaction(3f));
            }
            else
            {
                appModel.startMotion("okay", 0, LAppDefine.PRIORITY_NORMAL);
                StartCoroutine(displayReaction(5f));
            }
        }
        else if (string.Equals(avatar, "ethan"))
        {
            appModel.setExpression("idle");

            if (percentage >= 70)
            {
                appModel.startMotion("thumbs up", 0, LAppDefine.PRIORITY_NORMAL);
                StartCoroutine(displayReaction(3f));
            }
            else
            {
                appModel.startMotion("happy", 0, LAppDefine.PRIORITY_NORMAL);
                StartCoroutine(displayReaction(3.5f));
            }
        }
    }