public ClientChampion(ChampionSpawnInfo spawnInfo) : base(spawnInfo.ID, spawnInfo.SpawningPosition, spawnInfo.Type, spawnInfo.Team) { DrawnPosition = Position; MaxHealth = spawnInfo.MaxHealth; Health = spawnInfo.Health; }
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(); }
void AddChampionToGame(PlayerData data, bool ourChampion) { ChampionSpawnInfo spawn = new ChampionSpawnInfo(data.ID, data.Position, data.Type, data.Team, data.MaxHealth, data.Health); IDraw idraw; ClientChampion champ; if (ourChampion) { OurChampion = new MainDrawableChampion(spawn, Match, ChampionsInfo); idraw = OurChampion; champ = OurChampion.Champion; ChampionState.MaxLife = spawn.MaxHealth; ChampionState.CurrentLife = spawn.Health; } else { var remote = new RemoteDrawableChampion(spawn, spawn.Team == OurChampion.Champion.Team, ChampionsInfo); idraw = remote; champ = remote.Champion; } Champions.Add(champ); GameWorld.AddChild(idraw, 2); Match.CurrentState.AddEntity(champ); ILogger.Log( String.Format("New champion: id={0}, pos={1}, isOurChamp={2}", spawn.ID, spawn.SpawningPosition, ourChampion), LogPriority.High); }
public RemoteClientChampion(ChampionSpawnInfo spawnInfo) : base(spawnInfo) { StateHistory = new SnapshotHistory<StateUpdateData>(HISTORY_TIME_KEPT); }