public override void OnMessage(Message message) { string name = message.Name; object[] body = message.Params; switch (name) { case MessageConst.CMD_COAXSLEEP_OPEN_ANI: _curType = (OpenCoaxSleepAniType)message.Body; ShowCoaxSleepAniView(); break; case MessageConst.CMD_COAXSLEEP_PLAY_OVER: _aniPanel.Destroy(); switch (_curType) { case OpenCoaxSleepAniType.EnterInto: ShowCoaxSleepMainView(); break; case OpenCoaxSleepAniType.MainOnClick: _mainPanel.OnShow(); break; case OpenCoaxSleepAniType.PlayerViewOnClick: _playerAudioPanel.OnShow(); break; } break; case MessageConst.CMD_COAXSLEEP_GOTO_CUR_PLAYER: var player = (PlayerPB)body[0]; ShowCoaxSleepPlayerAudioView(player); break; case MessageConst.CMD_CPAXSLEEP_DESTROY_PANEL: string panelName = (string)message.Body; Debug.LogError("后退1111"); switch (panelName) { case "PlayerAudioPanel": _playerAudioPanel.Destroy(); _mainPanel.OnShow(); break; case "OnPlayAudioPanel": _onPlayAudioPanel.Destroy(); _playerAudioPanel.OnShow(); break; } break; case MessageConst.CMD_CPAXSLEEP_SHOW_ON_PLAY_PANEL: var data = (MyCoaxSleepAudioData)message.Body; ShowCoaxSleepOnPlayAudioView(data); break; } }
public override void Init() { _curType = OpenCoaxSleepAniType.EnterInto; ShowCoaxSleepAniView(); }