コード例 #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;
 }
コード例 #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;
 }
コード例 #3
0
ファイル: Creatures.cs プロジェクト: SwapBap/castledb-unity
 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;
     Spawn_Areas = (Spawn_AreasFlag)node["Spawn_Areas"].AsInt;
     Color       = CastleDBUtils.GetColorFromString(node["Color"]);
     Icon        = Resources.Load <Texture>(node["Icon"]) as Texture;
 }