예제 #1
0
        public override void Initialize()
        {
            base.Initialize();

            gunSpawns = new GunSpawnLocations();
            tiledBase.OnObjectLoaded += gunSpawns.OnObjectLoaded;

            playerSpawns              = new PlayerSpawnLocations();
            tiledBase.OnObjectLoaded += playerSpawns.OnObjectLoaded;

            sender = new NetManagerSender(port);

            serverConnection = stage.CreateActor(0).AddComponent <ServerConnectionComponent>();
            serverConnection.Set(playerSpawns, Name, stage);

            byte levelId = GameManager.GetRandomLevelNumber();

            LoadLevel(levelId);
            GameManager.currentLevel = levelId;

            stage.CreateActor(0).AddComponent <HostGameEndComponent>();
            stage.CreateActor(0).AddComponent <HostGameStartComponent>();
        }
예제 #2
0
 public GunSpawnLocations()
 {
     Instance = this;
 }