public SimEntity(SimEntitySpec spec) { ID = spec.ID; CardID = spec.CardID; Tags = new TagSet(); Tags.SetTags(spec.Tags); Enchantments = new List <SimEntity>(); }
/* --- Instance Methods (Interface) --- */ public void AddEntity(SimEntitySpec spec) { if (EntityMap.ContainsKey(spec.ID)) { Console.WriteLine("ERROR - SimGame::AddEntity(SimEntitySpec e) => already contains id (" + spec.ID + ")"); return; } EntityMap.Add(spec.ID, new SimEntity(spec)); }
public SimCreateGame(BinaryReader r) : base(SimPowerType.CREATE_GAME) { GameSpec = new SimEntitySpec(r); PlayerSpecs = new List <SimPlayerSpec>(); int c = r.ReadInt32(); for (int i = 0; i < c; ++i) { PlayerSpecs.Add(new SimPlayerSpec(r)); } }
public SimShowEntity(BinaryReader r) : base(SimPowerType.SHOW_ENTITY) { EntitySpec = new SimEntitySpec(r); }
public SimFullEntity(BinaryReader r) : base(SimPowerType.FULL_ENTITY) { EntitySpec = new SimEntitySpec(r); }
public SimPlayerSpec(BinaryReader r) { EntitySpec = new SimEntitySpec(r); ID = r.ReadInt32(); IsLocal = r.ReadBoolean(); }