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)); } }
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)); } } }