public MainClientChampion(ChampionSpawnInfo spawnInfo, GameMatch match)
			: base(spawnInfo)
        {
			Match = match;

			ServerPosition = Position;
			ServerCorrectionUsed = Position;

			PackagedActions = new Queue<PlayerAction>();
			RecentActions = new List<PlayerAction>();
			Corrections = new List<CorrectionInfo>();
			Corrected = false;
			PreviousLastAck = IDGenerator.NO_ID;


			NoCorrections = (IEntity)this.Clone();
        }
Esempio n. 2
0
        public GameplayScreen(ContentManager content, Game game, Client client)
			: base(content, game)
        {
			Client = client;
			ChampionsInfo = new ChampionsInfo();

			GameTime = null;
			TimeSinceLastInputSent = 0.0;

			Match = new GameMatch(Path.Combine("Content", MapLoader.MAIN_MAP_PATH));
			LastStateUpdateData = new List<StateUpdateData>();
			RemarkableEvents = new List<RemarkableEventData>();
			Spells = new Dictionary<ulong, DrawableSpell>();
			TimeOfLastStateUpdate = 0.0;
			Champions = new List<ClientChampion>();

			GameWorld = new Container();
			Structures = new List<DrawableStructure>();

			Camera = new CameraService();
			Services.AddService(typeof(CameraService), Camera);

			((SoundService)Services.GetService(typeof(SoundService))).CameraService = Camera;

			Parallax = new Parallax();

			KillDisplay = new KillDisplay(ChampionsInfo);

			GameScore = new GameScore();

			Sound = (SoundService)Services.GetService(typeof(SoundService));
        }
Esempio n. 3
0
        public ServerGame(NetServer server)
        {
			NetServer = server;
			Clients = new Dictionary<NetConnection, ServerClient>();
			ActiveSpells = new List<LinearSpell>();

			StateHistory = new SnapshotHistory<MatchState>(HISTORY_MAX_TIME_KEPT);
			Match = new GameMatch(MapLoader.MAIN_MAP_PATH);

			RemarkableEvents = new List<KeyValuePair<ServerCommand, Action<NetBuffer>>>();

			TimeSinceLastCorrection = 0.0;
			TimeSinceLastGameHistory = 0.0;

			LeftKills = RightKills = 0;
        }