Beispiel #1
0
 public SimEntity(SimEntitySpec spec)
 {
     ID     = spec.ID;
     CardID = spec.CardID;
     Tags   = new TagSet();
     Tags.SetTags(spec.Tags);
     Enchantments = new List <SimEntity>();
 }
Beispiel #2
0
 /* --- 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));
 }
Beispiel #3
0
        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));
            }
        }
Beispiel #4
0
 public SimShowEntity(BinaryReader r) : base(SimPowerType.SHOW_ENTITY)
 {
     EntitySpec = new SimEntitySpec(r);
 }
Beispiel #5
0
 public SimFullEntity(BinaryReader r) : base(SimPowerType.FULL_ENTITY)
 {
     EntitySpec = new SimEntitySpec(r);
 }
Beispiel #6
0
 public SimPlayerSpec(BinaryReader r)
 {
     EntitySpec = new SimEntitySpec(r);
     ID         = r.ReadInt32();
     IsLocal    = r.ReadBoolean();
 }