예제 #1
0
파일: SimEntity.cs 프로젝트: ohio813/HSInfo
 public SimEntity(SimEntitySpec spec)
 {
     ID     = spec.ID;
     CardID = spec.CardID;
     Tags   = new TagSet();
     Tags.SetTags(spec.Tags);
     Enchantments = new List <SimEntity>();
 }
예제 #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));
 }
예제 #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));
            }
        }
예제 #4
0
 public SimShowEntity(BinaryReader r) : base(SimPowerType.SHOW_ENTITY)
 {
     EntitySpec = new SimEntitySpec(r);
 }
예제 #5
0
 public SimFullEntity(BinaryReader r) : base(SimPowerType.FULL_ENTITY)
 {
     EntitySpec = new SimEntitySpec(r);
 }
예제 #6
0
 public SimPlayerSpec(BinaryReader r)
 {
     EntitySpec = new SimEntitySpec(r);
     ID         = r.ReadInt32();
     IsLocal    = r.ReadBoolean();
 }