最新修改提交

This commit is contained in:
高铎 2025-10-09 09:37:07 +08:00
parent 87ead324a9
commit 51ba5028bc
2 changed files with 11 additions and 7 deletions

View File

@ -27,6 +27,7 @@ namespace DongWuYiXue.QiGuanChaGuan
{ {
if (c.name.Equals("固定导管的高亮")) if (c.name.Equals("固定导管的高亮"))
{ {
fsm.HideTipBtn();
fsm.HideArrow(); fsm.HideArrow();
if (fsm.main_gameModel.modeType == ModeType.ShiXun) if (fsm.main_gameModel.modeType == ModeType.ShiXun)
{ {

View File

@ -17,16 +17,19 @@ namespace DongWuYiXue.QiGuanChaGuan
base.Init(uictrl); base.Init(uictrl);
scoreText = transform.FindFirst<Text>("Score"); scoreText = transform.FindFirst<Text>("Score");
} }
public void SetScore(string addScore,string totalScore) public void SetScore(string addScore, string totalScore)
{ {
AddEffect(addScore,totalScore); AddEffect(addScore, totalScore);
} }
void AddEffect(string score,string totalScore) void AddEffect(string score, string totalScore)
{ {
transform.FindFirst<TextMeshProUGUI>("AddScore_Txt").text = $"+{score}"; if (!score.Equals("0"))
transform.FindFirst("AddScoreAnim").gameObject.SetActive(false); {
transform.FindFirst("AddScoreAnim").gameObject.SetActive(true); transform.FindFirst<TextMeshProUGUI>("AddScore_Txt").text = $"+{score}";
scoreText.text = totalScore; transform.FindFirst("AddScoreAnim").gameObject.SetActive(false);
transform.FindFirst("AddScoreAnim").gameObject.SetActive(true);
scoreText.text = totalScore;
}
//switch (score) //switch (score)
//{ //{
// case "1": // case "1":