Beispiel #1
0
    private void Start()
    {
        _configuration = NetworkConfigurationGetter.getConfigurationObject();
        InitializeBoardPositions();
        _player1 = new Player(1, PlayerType.HumanPlayer, Cross);
        _player2 = new Player(2, PlayerType.HumanPlayer, Circle);

        if (!isServer)
        {
            return;
        }

        StartCoroutine(CheckUser());
        _configuration = NetworkConfigurationGetter.getConfigurationObject();

        _game = new Game(_player1, _player2);

        //_configuration.Starter = 2;
        if (_configuration.Starter == 1)
        {
            SetCurrentPlayer(_player1, _game);
            ChangeAllAuthority("LocalPlayer");
        }
        else
        {
            SetCurrentPlayer(_player2, _game);
            ChangeAllAuthority("OtherPlayer");
        }

        _finishingGame = false;
    }
Beispiel #2
0
    private IEnumerator CallNextScene()
    {
        yield return(new WaitForSeconds(5));

        BoardNetworkConfiguration config = NetworkConfigurationGetter.getConfigurationObject();

        config.Starter = _starter;
        if (_configurationGame && _configurationGame.NetworkType == NetworkOptions.Options.Lan.ToString())
        {
            NetworkManagerSpecific.singleton.ServerChangeScene("BoardNetworkScene");
        }
        else
        {
            NetworkLobbyManagerSpecific.LobbyManager.ServerChangeScene("BoardNetworkScene");
        }
    }
Beispiel #3
0
 void DropdownValueChanged(Dropdown change)
 {
     if (change.value != 0)
     {
         if ((change.value) == 1)
         {
             panelLan.SetActive(true);
             panelMatchMaker.SetActive(false);
             NetworkManagerSpecific.StartDiscovery();
             configuration             = NetworkConfigurationGetter.getConfigurationObject();
             configuration.NetworkType = "LAN";
         }
         else
         {
             panelLan.SetActive(false);
             panelMatchMaker.SetActive(true);
         }
     }
     else
     {
         panelLan.SetActive(false);
         panelMatchMaker.SetActive(false);
     }
 }
Beispiel #4
0
 void Start()
 {
     _configuration     = NetworkConfigurationGetter.getConfigurationObject();
     _configurationGame = BoardConfigurationGetter.getConfigurationObject();
     AddListeners();
 }
Beispiel #5
0
 public void Start()
 {
     _configurationGame = NetworkConfigurationGetter.getConfigurationObject();
 }