/// <summary> /// 处理接收到的消息列表 /// </summary> /// <param name="notification"></param> public override void HandleNotification(INotification notification) { Model_GameData gameData = null; switch (notification.Name) { case ProjectConst.MSG_INITMEDIATOR_FIELD: InitMediatorField(); break; case ProjectConst.MSG_DISPLAYERGAMEINFO: gameData = notification.Body as Model_GameData; if (gameData != null) { if (_txtShowGameTime && _txtShowGameScore && _txtShowGameHightestScore) { _txtShowGameTime.text = gameData.GameTime.ToString(); _txtShowGameScore.text = gameData.Scores.ToString(); _txtShowGameHightestScore.text = gameData.HightestScores.ToString(); } } break; default: break; } }
public Model_GameDataProxy() : base(NAME) { _gameData = new Model_GameData(); // 得到最高分 _gameData.HightestScores = PlayerPrefs.GetInt(ProjectConst.GAMEHIGHTESTSCORES); }