示例#1
0
 public Items(CastleDBParser.RootNode root, SimpleJSON.JSONNode node, Dictionary <string, Texture> DatabaseImages)
 {
     id     = node["id"];
     name   = node["name"];
     Weight = node["Weight"].AsInt;
     image  = DatabaseImages[node["image"]];
 }
示例#2
0
 public FX_Storage(CastleDBParser.RootNode root, RowValues line)
 {
     SimpleJSON.JSONNode node = root.GetSheetWithName("FX_Storage").Rows[(int)line];
     id       = node["id"];
     FXPath   = node["FXPath"];
     FXPrefab = node["FXPrefab"];
 }
示例#3
0
 public Enemies(CastleDBParser.RootNode root, RowValues line)
 {
     SimpleJSON.JSONNode node = root.GetSheetWithName("Enemies").Rows[(int)line];
     id        = node["id"];
     EnemyName = node["EnemyName"];
     Health    = node["Health"].AsInt;
 }
示例#4
0
 public Weapons(CastleDBParser.RootNode root, RowValues line)
 {
     SimpleJSON.JSONNode node = root.GetSheetWithName("Weapons").Rows[(int)line];
     id         = node["id"];
     Name       = node["Name"];
     Isavariant = node["Isavariant"].AsBool;
     foreach (var item in node["WeaponVariantReference"])
     {
         WeaponVariantReferenceList.Add(new WeaponVariantReference(root, item));
     }
     foreach (var item in node["WeaponModelPath"])
     {
         WeaponModelPathList.Add(new WeaponModelPath(root, item));
     }
     foreach (var item in node["WeaponFX"])
     {
         WeaponFXList.Add(new WeaponFX(root, item));
     }
     Health = node["Health"].AsFloat;
     Armor  = node["Armor"].AsFloat;
     foreach (var item in node["WeaponRoles"])
     {
         WeaponRolesList.Add(new WeaponRoles(root, item));
     }
     Ammo                  = new CompiledTypes.Ammos(root, CompiledTypes.Ammos.GetRowValue(node["Ammo"]));
     Max_range             = node["Max_range"].AsFloat;
     Min_range             = node["Min_range"].AsFloat;
     Muzzle_velocity       = node["Muzzle_velocity"].AsFloat;
     Reload_time           = node["Reload_time"].AsFloat;
     Precision             = node["Precision"].AsInt;
     Rotation_speed        = node["Rotation_speed"].AsFloat;
     Elevation_speed       = node["Elevation_speed"].AsFloat;
     Max_vertical_traverse = node["Max_vertical_traverse"].AsFloat;
     Min_vertical_traverse = node["Min_vertical_traverse"].AsFloat;
 }
示例#5
0
 public Modifiers(CastleDBParser.RootNode root, RowValues line)
 {
     SimpleJSON.JSONNode node = root.GetSheetWithName("Modifiers").Rows[(int)line];
     id     = node["id"];
     name   = node["name"];
     change = node["change"].AsInt;
 }
示例#6
0
 public Items(CastleDBParser.RootNode root, RowValues line)
 {
     SimpleJSON.JSONNode node = root.GetSheetWithName("Items").Rows[(int)line];
     id     = node["id"];
     name   = node["name"];
     Weight = node["Weight"].AsInt;
 }
示例#7
0
 public Countries(CastleDBParser.RootNode root, RowValues line)
 {
     SimpleJSON.JSONNode node = root.GetSheetWithName("Countries").Rows[(int)line];
     id   = node["id"];
     Name = node["Name"];
     Team = new CompiledTypes.Teams(root, CompiledTypes.Teams.GetRowValue(node["Team"]));
     Flag = node["Flag"];
 }
 public UnitHardPoints(CastleDBParser.RootNode root, SimpleJSON.JSONNode node)
 {
     HardPointId            = node["HardPointId"];
     HardPointType          = new CompiledTypes.HardPoints(root, CompiledTypes.HardPoints.GetRowValue(node["HardPointType"]));
     IsTransferedToVariants = node["IsTransferedToVariants"].AsBool;
     IsMirrored             = node["IsMirrored"].AsBool;
     WeaponType             = new CompiledTypes.Weapons(root, CompiledTypes.Weapons.GetRowValue(node["WeaponType"]));
 }
 public Teams(CastleDBParser.RootNode root, RowValues line)
 {
     SimpleJSON.JSONNode node = root.GetSheetWithName("Teams").Rows[(int)line];
     id             = node["id"];
     Name           = node["Name"];
     TeamColorRed   = node["TeamColorRed"].AsFloat;
     TeamColorGreen = node["TeamColorGreen"].AsFloat;
     TeamColorBlue  = node["TeamColorBlue"].AsFloat;
 }
示例#10
0
 public Drops(CastleDBParser.RootNode root, SimpleJSON.JSONNode node, Dictionary <string, Texture> DatabaseImages)
 {
     item       = new CompiledTypes.Items(root, root.GetSheetWithName("Items").Rows.Find(pred => pred["id"] == node["item"]), DatabaseImages);
     DropChance = node["DropChance"].AsInt;
     foreach (var item in node["PossibleEffects"])
     {
         PossibleEffectsList.Add(new PossibleEffects(root, item));
     }
 }
示例#11
0
 public Drops(CastleDBParser.RootNode root, SimpleJSON.JSONNode node)
 {
     item       = new CompiledTypes.Items(root, CompiledTypes.Items.GetRowValue(node["item"]));
     DropChance = node["DropChance"].AsInt;
     foreach (var item in node["PossibleEffects"])
     {
         PossibleEffectsList.Add(new PossibleEffects(root, item));
     }
 }
示例#12
0
 public RigidBodyData(CastleDBParser.RootNode root, SimpleJSON.JSONNode node)
 {
     CategoryDrag        = node["CategoryDrag"].AsFloat;
     CategoryAngularDrag = node["CategoryAngularDrag"].AsFloat;
     CatUseGravity       = node["CatUseGravity"].AsBool;
     CatIsKinematic      = node["CatIsKinematic"].AsBool;
     CatFreezePosition   = node["CatFreezePosition"].AsBool;
     CatFreezeRotation   = node["CatFreezeRotation"].AsBool;
 }
示例#13
0
 public Units_sub_categories(CastleDBParser.RootNode root, RowValues line)
 {
     SimpleJSON.JSONNode node = root.GetSheetWithName("Units_sub_categories").Rows[(int)line];
     id             = node["id"];
     Classification = node["Classification"];
     Name           = node["Name"];
     Category       = new CompiledTypes.Units_categories(root, CompiledTypes.Units_categories.GetRowValue(node["Category"]));
     MapModel       = node["MapModel"];
     DeathFX        = new CompiledTypes.FX_Storage(root, CompiledTypes.FX_Storage.GetRowValue(node["DeathFX"]));
 }
示例#14
0
 public MonsterDB(CastleDBParser.RootNode root, RowValues line)
 {
     SimpleJSON.JSONNode node = root.GetSheetWithName("MonsterDB").Rows[(int)line];
     id        = node["id"];
     HitPoints = node["HitPoints"].AsInt;
     Sprite    = node["Sprite"];
     foreach (var item in node["Drops"])
     {
         DropsList.Add(new Drops(root, item));
     }
 }
示例#15
0
 public Scenarios(CastleDBParser.RootNode root, RowValues line)
 {
     SimpleJSON.JSONNode node = root.GetSheetWithName("Scenarios").Rows[(int)line];
     id            = node["id"];
     ScenarioScene = node["ScenarioScene"];
     foreach (var item in node["ScenarioGameModes"])
     {
         ScenarioGameModesList.Add(new ScenarioGameModes(root, item));
     }
     foreach (var item in node["DuelSpawnPoints"])
     {
         DuelSpawnPointsList.Add(new DuelSpawnPoints(root, item));
     }
 }
示例#16
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;
 }
示例#17
0
 public Units_categories(CastleDBParser.RootNode root, RowValues line)
 {
     SimpleJSON.JSONNode node = root.GetSheetWithName("Units_categories").Rows[(int)line];
     id   = node["id"];
     Name = node["Name"];
     foreach (var item in node["Scripts"])
     {
         ScriptsList.Add(new Scripts(root, item));
     }
     FileName = node["FileName"];
     foreach (var item in node["RigidBodyData"])
     {
         RigidBodyDataList.Add(new RigidBodyData(root, item));
     }
 }
 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;
 }
示例#19
0
 public Buoyancy(CastleDBParser.RootNode root, SimpleJSON.JSONNode node)
 {
     foreach (var item in node["Center_of_mass"])
     {
         Center_of_massList.Add(new Center_of_mass(root, item));
     }
     foreach (var item in node["Force_points"])
     {
         Force_pointsList.Add(new Force_points(root, item));
     }
     Model_width   = node["Model_width"].AsFloat;
     Vertical_drag = node["Vertical_drag"].AsFloat;
     Engine_power  = node["Engine_power"].AsFloat;
     Rotation_time = node["Rotation_time"].AsFloat;
 }
示例#20
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;
     Spawn_Areas = (Spawn_AreasFlag)node["Spawn_Areas"].AsInt;
     Color       = CastleDBUtils.GetColorFromString(node["Color"]);
     Icon        = Resources.Load <Texture>(node["Icon"]) as Texture;
 }
示例#21
0
 public CastleDB(TextAsset castleDBAsset, TextAsset castleDBImagesAsset = null)
 {
     parsedDB = new CastleDBParser(castleDBAsset, castleDBImagesAsset);
     CastleDBParser.RootNode root = parsedDB.Root;
     Creatures = new Dictionary <string, Creatures>();
     foreach (var row in root.GetSheetWithName("Creatures").Rows)
     {
         Creatures[row["id"]] = new Creatures(root, row, parsedDB.DatabaseImages);
     }
     Items = new Dictionary <string, Items>();
     foreach (var row in root.GetSheetWithName("Items").Rows)
     {
         Items[row["id"]] = new Items(root, row, parsedDB.DatabaseImages);
     }
     Modifiers = new Dictionary <string, Modifiers>();
     foreach (var row in root.GetSheetWithName("Modifiers").Rows)
     {
         Modifiers[row["id"]] = new Modifiers(root, row);
     }
 }
 public Ammos(CastleDBParser.RootNode root, RowValues line)
 {
     SimpleJSON.JSONNode node = root.GetSheetWithName("Ammos").Rows[(int)line];
     id   = node["id"];
     Name = node["Name"];
     foreach (var item in node["AmmoModelPath"])
     {
         AmmoModelPathList.Add(new AmmoModelPath(root, item));
     }
     foreach (var item in node["AmmoFX"])
     {
         AmmoFXList.Add(new AmmoFX(root, item));
     }
     Weight           = node["Weight"].AsFloat;
     DamageMax        = node["DamageMax"].AsFloat;
     DamageMin        = node["DamageMin"].AsFloat;
     ArmorPenetration = node["ArmorPenetration"].AsFloat;
     ExplosionRadius  = node["ExplosionRadius"].AsFloat;
     MaxLifeTime      = node["MaxLifeTime"].AsFloat;
 }
 public Global_Units(CastleDBParser.RootNode root, RowValues line)
 {
     SimpleJSON.JSONNode node = root.GetSheetWithName("Global_Units").Rows[(int)line];
     id         = node["id"];
     Isavariant = node["Isavariant"].AsBool;
     foreach (var item in node["UnitVariantReference"])
     {
         UnitVariantReferenceList.Add(new UnitVariantReference(root, item));
     }
     UnitName = node["UnitName"];
     foreach (var item in node["UnitModelPath"])
     {
         UnitModelPathList.Add(new UnitModelPath(root, item));
     }
     UnitCategory = new CompiledTypes.Units_sub_categories(root, CompiledTypes.Units_sub_categories.GetRowValue(node["UnitCategory"]));
     UnitNation   = new CompiledTypes.Countries(root, CompiledTypes.Countries.GetRowValue(node["UnitNation"]));
     foreach (var item in node["UnitScore"])
     {
         UnitScoreList.Add(new UnitScore(root, item));
     }
     foreach (var item in node["UnitCameraParameters"])
     {
         UnitCameraParametersList.Add(new UnitCameraParameters(root, item));
     }
     UnitHealth = node["UnitHealth"].AsFloat;
     UnitMass   = node["UnitMass"].AsFloat;
     foreach (var item in node["UnitDamagecontrol"])
     {
         UnitDamagecontrolList.Add(new UnitDamagecontrol(root, item));
     }
     foreach (var item in node["Buoyancy"])
     {
         BuoyancyList.Add(new Buoyancy(root, item));
     }
     foreach (var item in node["UnitHardPoints"])
     {
         UnitHardPointsList.Add(new UnitHardPoints(root, item));
     }
 }
示例#24
0
 public UnitDamagecontrol(CastleDBParser.RootNode root, SimpleJSON.JSONNode node)
 {
     Repairrate = node["Repairrate"].AsFloat;
     Repaircrew = node["Repaircrew"].AsInt;
 }
示例#25
0
 public WeaponModelPath(CastleDBParser.RootNode root, SimpleJSON.JSONNode node)
 {
     TurretPath  = node["TurretPath"];
     TurretModel = node["TurretModel"];
 }
 public HardPoints(CastleDBParser.RootNode root, RowValues line)
 {
     SimpleJSON.JSONNode node = root.GetSheetWithName("HardPoints").Rows[(int)line];
     id = node["id"];
 }
示例#27
0
 public Force_points(CastleDBParser.RootNode root, SimpleJSON.JSONNode node)
 {
     X = node["X"].AsFloat;
     Y = node["Y"].AsFloat;
     Z = node["Z"].AsFloat;
 }
示例#28
0
 public UnitVariantReference(CastleDBParser.RootNode root, SimpleJSON.JSONNode node)
 {
     UnitVariantRef = new CompiledTypes.Global_Units(root, CompiledTypes.Global_Units.GetRowValue(node["UnitVariantRef"]));
 }
 public UnitScore(CastleDBParser.RootNode root, SimpleJSON.JSONNode node)
 {
     Commandpoints = node["Commandpoints"].AsInt;
     Victorypoints = node["Victorypoints"].AsInt;
     SquadSize     = node["SquadSize"].AsInt;
 }
示例#30
0
 public UnitCameraParameters(CastleDBParser.RootNode root, SimpleJSON.JSONNode node)
 {
     Distance      = node["Distance"].AsFloat;
     Height        = node["Height"].AsFloat;
     Lateraloffset = node["Lateraloffset"].AsFloat;
 }