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; }
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; }
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; }