Exemplo n.º 1
0
        private void OnTryConnection()
        {
            if (PhotonNetwork.connectionState != ConnectionState.Disconnected)
            {
                return;
            }

            if (Connection_InputField.text.Length > 3)
            {
                ConnectorPhoton.Connection_Photon(Connection_InputField.text);
            }
            else
            {
                Connection_InputField.Select();
            }
        }
Exemplo n.º 2
0
        public Game(ConnectorPhoton p)
        {
            parent      = p;
            OtherPlayer = new PlayerDto();
            LocalPlayer = new PlayerDto();
            LocalPlayer.PlayerPhoton = PhotonNetwork.player;

            ListenersEndOfGame        = new List <IEndOfGame>();
            ListenersEndOfTurn        = new List <IEndOfTurn>();
            ListenersNewCharacterTurn = new List <INewCharacterTurn>();
            ListenersPlayerAttack     = new List <IPlayerAttack>();
            ListenersPlayerJoinRoom   = new List <IPlayerJoinRoom>();
            ListenersPlayerLeaveRoom  = new List <IPlayerLeaveRoom>();
            ListenersPlayerMovement   = new List <IPlayerMovement>();
            ListenersPlayerReady      = new List <IPlayerReady>();
            ListenersStartGame        = new List <IStartGame>();
        }