Exemplo n.º 1
0
 public void SetMultiplayerService(IMultiplayer multiplayer)
 {
     this.multiplayer = multiplayer;
     multiplayer.connectedToMaster      += OnConnected;
     multiplayer.disconnectedFromServer += OnDisconnected;
     multiplayer.joinedToLobby          += OnJoinLobby;
     multiplayer.joinedRoom             += OnJoinRoom;
 }
Exemplo n.º 2
0
        private void Start()
        {
            multiplayer = new MultiplayerService();
            uiService   = new UIService(uIView);
            uiService.SetMultiplayerService(multiplayer);
            multiplayer.SetUIService(uiService);

            multiplayer.ConnectToServer();
        }
Exemplo n.º 3
0
 public void SetMultiplayerService(IMultiplayer multiplayer)
 {
     this.multiplayer = multiplayer;
     uiController.SetMultiplayerService(multiplayer);
 }
		/// <summary>
		/// Inicjalizuje grę.
		/// </summary>
		/// <param name="mp">Główny obiekt gry.</param>
		public MultiplayerGameState(IMultiplayer mp)
		{
			this.Game = mp;
			this.Entities = new ClashEngine.NET.EntitiesManager.EntitiesManager(mp.GameInfo);

			this.VictoryRules = System.Activator.CreateInstance(ServerConfiguration.Instance.VictoryRules) as IVictoryRules;
			this.Controller = System.Activator.CreateInstance(ServerConfiguration.Instance.GameController) as IGameController;
			this.Settings = ServerConfiguration.Instance.ControllerSettings;
			this.Map = new Maps.DefaultMap();
		}