public override bool OnEvent(IGIIEvent giiEvent) { bool ret = true; switch (giiEvent.Name) { case GamePlayEvents.StartGame: _newGameButton.interactable = false; break; case GamePlayEvents.FinishGame: ShowResult(); break; case GamePlayEvents.PlayerJoin: onPlayerJoined((IGamePlayer)giiEvent.Body); break; case GamePlayEvents.PlayerTurnBegin: onPlayerTurnBegin((IGamePlayer)giiEvent.Body); break; case GamePlayEvents.PlayerTurnEnd: onPlayerTurnEnd((IGamePlayer)giiEvent.Body); break; } ret = base.OnEvent(giiEvent); return(ret); }
public virtual bool OnEvent(IGIIEvent eventData) { if (eventData.Name == GameConfigEvents.PREFERED_LANGUAGE_CHANGE) { onLanguageChange((LanguageEnum)eventData.Body); } return(true); }
public virtual bool OnEvent(IGIIEvent giiEvent) { if (giiEvent.Name == _showReadyEvent) { onShowReady(); } else if (giiEvent.Name == _hideReadyEvent) { onHideReady(); } return(true); }