Exemplo n.º 1
0
 public Creatures(CastleDBParser.RootNode root, SimpleJSON.JSONNode node, Dictionary <string, Texture> DatabaseImages)
 {
     id             = node["id"];
     Name           = node["Name"];
     attacksPlayer  = node["attacksPlayer"].AsBool;
     BaseDamage     = node["BaseDamage"].AsInt;
     DamageModifier = node["DamageModifier"].AsFloat;
     foreach (var item in node["Drops"])
     {
         DropsList.Add(new Drops(root, item, DatabaseImages));
     }
     DeathSound = (DeathSoundEnum)node["DeathSound"].AsInt;
     SpawnAreas = (SpawnAreasFlag)node["SpawnAreas"].AsInt;
 }
Exemplo n.º 2
0
 public Creatures(CastleDBParser.RootNode root, RowValues line)
 {
     SimpleJSON.JSONNode node = root.GetSheetWithName("Creatures").Rows[(int)line];
     id             = node["id"];
     Name           = node["Name"];
     attacksPlayer  = node["attacksPlayer"].AsBool;
     BaseDamage     = node["BaseDamage"].AsInt;
     DamageModifier = node["DamageModifier"].AsFloat;
     foreach (var item in node["Drops"])
     {
         DropsList.Add(new Drops(root, item));
     }
     DeathSound = (DeathSoundEnum)node["DeathSound"].AsInt;
     SpawnAreas = (SpawnAreasFlag)node["SpawnAreas"].AsInt;
 }