using System.Collections; using System.Collections.Generic; using System.Drawing; using TMPro; using UnityEngine; public class JournalPanel : MonoBehaviour { public string gameNo;//游戏期号 public float bet;//下注的蜗牛蛋 public int roomNo;// 下注房间号 public string roomNoKill;// 击杀房间号 public int outcome;//本局结果:默认0还未结束,1胜利,2失败 public float beansCoin;// 本局最终获得欢乐豆 public string createTime;// 创建时间 public TextMeshProUGUI gameNoText;//游戏期号 public TextMeshProUGUI betText;//下注的蜗牛蛋 public TextMeshProUGUI roomNoText;// 下注房间号 public TextMeshProUGUI roomNameKillText;// 击杀房间号 public TextMeshProUGUI outcomeText;//本局结果:默认0还未结束,1胜利,2失败 public TextMeshProUGUI beansCoinText;// 本局最终获得欢乐豆 public TextMeshProUGUI createTimeText;// 创建时间 // Start is called before the first frame update void Start() { SetOutcomeText(); JudgeRoomName(roomNo); } public void SetOutcomeText()//设置成功或者失败文本 { if (outcome == 1) { outcomeText.text = "逃脱成功"; } else if (outcome == 2) { outcomeText.text = "逃脱失败"; } } public void JudgeRoomName(int roomNo) { if (roomNo == 1) { roomNoText.text = "【紫怪屋】"; } else if (roomNo == 2) { roomNoText.text = "【青嬉舍】"; } else if (roomNo == 3) { roomNoText.text = "【粉乐居】"; } else if (roomNo == 4) { roomNoText.text = "【黄逗室】"; } else if (roomNo == 5) { roomNoText.text = "【蓝笑窟】"; } else if (roomNo == 6) { roomNoText.text = "【绿趣巢】"; } } public void SetKillRoomText() { string[] parts = roomNoKill.Split(","); foreach (string part in parts) { } } }