protected override void OnClick()
        {
            base.OnClick();

            switch (option)
            {
            case PageButtonOption.Next:
                if (SendTo != NetworkInstanceType.Null)
                {
                    _newNetworkServer.SendMessageToType("NetworkGoToNextPage", "", SendTo);
                }
                else
                {
                    _newNetworkServer.SendMessageToAll("NetworkGoToNextPage", "");
                }
                break;

            case PageButtonOption.Previous:
                if (SendTo != NetworkInstanceType.Null)
                {
                    _newNetworkServer.SendMessageToType("NetworkGoToPreviousPage", "", SendTo);
                }
                else
                {
                    _newNetworkServer.SendMessageToAll("NetworkGoToPreviousPage", "");
                }
                break;

            case PageButtonOption.Especific:
                if (SendTo != NetworkInstanceType.Null)
                {
                    _newNetworkServer.SendMessageToType("NetworkOpenPageById", JsonConvert.SerializeObject(Especific), SendTo);
                }
                else
                {
                    _newNetworkServer.SendMessageToAll("NetworkOpenPageById", JsonConvert.SerializeObject(Especific));
                }
                break;

            case PageButtonOption.Type:
                if (SendTo != NetworkInstanceType.Null)
                {
                    _newNetworkServer.SendMessageToType("NetworkOpenPageByType", JsonConvert.SerializeObject(Type), SendTo);
                }
                else
                {
                    _newNetworkServer.SendMessageToAll("NetworkOpenPageByType", JsonConvert.SerializeObject(Type));
                }
                break;
            }
        }
Beispiel #2
0
        protected override void OnClick()
        {
            base.OnClick();

#if HAS_SERVER
            if (Show)
            {
                NetController.SendMessageToAll("NetworkShowRank", "");
            }
            else
            {
                NetController.SendMessageToAll("NetworkHideRank", "");
            }
#endif
        }
Beispiel #3
0
        public void CallAction(int id)
        {
            DebugLog("Calling " + id);
#if HAS_SERVER
            if (_isServer)
            {
                _serverController.SendMessageToAll("NetworkCallAction", JsonConvert.SerializeObject(id));
            }
            else
            {
                _clientController.SendMessageToServer("NetworkCallAction", JsonConvert.SerializeObject(id));
            }
#endif
            if (CallGenericAction != null)
            {
                CallGenericAction(id);
            }
        }
Beispiel #4
0
        protected override void OnClick()
        {
            base.OnClick();

            if (SendToPassive)
            {
                _newNetworkServer.SendMessageToType("NetworkEndQuestion", "", NetworkInstanceType.ListeningClient);
            }
            else
            {
                _newNetworkServer.SendMessageToAll("NetworkEndQuestion", "");
            }
        }
Beispiel #5
0
        protected override void OnClick()
        {
            base.OnClick();

            serverController.SendMessageToAll("NetworkPaintByPoints", "");
        }
Beispiel #6
0
 protected override void OnClick()
 {
     base.OnClick();
     _newNetworkServer.SendMessageToAll("BootstrapPauseGame", JsonConvert.SerializeObject(Game));
 }
        protected override void OnClick()
        {
            base.OnClick();

            controller.SendMessageToAll("NetworkUpdateFeedback", "");
        }
Beispiel #8
0
        protected override void OnClick()
        {
            base.OnClick();

            serverController.SendMessageToAll("NetworkGlobalSetWinnerGroup", JsonConvert.SerializeObject(Id));
        }