public Model_GameDataProxy() : base(NAME) { _GameData = new Model_GameData(); // 得到最高分 _GameData.HighestScore = GetHighestScore(); }
/// <summary> /// 处理接收到的消息 /// </summary> /// <param name="notification"></param> public override void HandleNotification(INotification notification) { Model_GameData gameData = null; switch (notification.Name) { case ConstData.Msg_DisplayGameDataInfo: gameData = notification.Body as Model_GameData; if (gameData != null) { if (TimeDy_Text && HighestScoreDy_Text && CurrentScoreDy_Text) { TimeDy_Text.text = gameData.GameTime.ToString(); HighestScoreDy_Text.text = gameData.HighestScore.ToString(); CurrentScoreDy_Text.text = gameData.Scores.ToString(); } } break; default: break; } }