Table of Contents
Extensions for the GameModel
public static class GameModelExt
Inheritance System.Object GameModelExt
Adds a HeroDetailsModel to the GameModel's HeroSet at a particular index
public static void AddHeroDetails(this GameModel model, HeroDetailsModel heroDetailsModel, int index);
model
Il2CppAssets.Scripts.Models.GameModel
heroDetailsModel
Il2CppAssets.Scripts.Models.TowerSets.HeroDetailsModel
index
System.Int32
Adds a TowerDetailsModel to the GameModel's TowerSet at a particular index
public static void AddTowerDetails(this GameModel model, TowerDetailsModel towerDetailsModel, int index);
model
Il2CppAssets.Scripts.Models.GameModel
towerDetailsModel
Il2CppAssets.Scripts.Models.TowerSets.TowerDetailsModel
index
System.Int32
Adds a TowerDetailsModel to the GameModel's TowerSet, taking into account what set of towers it's a part of
For example, a new custom Primary tower would be added right at the end of the primary towers,
and right before the start of the military towers
public static void AddTowerDetails(this GameModel model, TowerDetailsModel towerDetailsModel, TowerSet set);
model
Il2CppAssets.Scripts.Models.GameModel
The GameModel
towerDetailsModel
Il2CppAssets.Scripts.Models.TowerSets.TowerDetailsModel
The TowerDetailsModel to be added
set
Il2CppAssets.Scripts.Models.TowerSets.TowerSet
The TowerSet of the tower to be added
Adds a tower
public static void AddTowerDetails(this GameModel model, TowerDetailsModel towerDetailsModel);
model
Il2CppAssets.Scripts.Models.GameModel
towerDetailsModel
Il2CppAssets.Scripts.Models.TowerSets.TowerDetailsModel
Add multiple TowerModels to the game more efficiently than calling the single method repeatedly.
public static void AddTowersToGame(this GameModel model, System.Collections.Generic.IEnumerable<TowerModel> towerModels);
model
Il2CppAssets.Scripts.Models.GameModel
towerModels
System.Collections.Generic.IEnumerable<Il2CppAssets.Scripts.Models.Towers.TowerModel>
Add a TowerModel to the game.
Using this method is preferable than modifying the GameModel's towers list manually, as this does more things
to more fully integrate the tower within the game
public static void AddTowerToGame(this GameModel model, TowerModel towerModel, TowerDetailsModel towerDetailsModel=null);
model
Il2CppAssets.Scripts.Models.GameModel
the GameModel instance
towerModel
Il2CppAssets.Scripts.Models.Towers.TowerModel
TowerModel to add
towerDetailsModel
Il2CppAssets.Scripts.Models.TowerSets.TowerDetailsModel
Optionally add a TowerDetailsModel for your towerModel
Fully adds an UpgradeModel to the GameModel
public static void AddUpgrade(this GameModel model, UpgradeModel upgradeModel);
model
Il2CppAssets.Scripts.Models.GameModel
upgradeModel
Il2CppAssets.Scripts.Models.Towers.Upgrades.UpgradeModel
Fully adds multiple UpgradeModels to the GameModel
public static void AddUpgrades(this GameModel model, System.Collections.Generic.List<UpgradeModel> upgradeModels);
model
Il2CppAssets.Scripts.Models.GameModel
upgradeModels
System.Collections.Generic.List<Il2CppAssets.Scripts.Models.Towers.Upgrades.UpgradeModel>
Fully adds multiple UpgradeModels to the GameModel
public static void AddUpgrades(this GameModel model, UpgradeModel[] upgradeModels);
model
Il2CppAssets.Scripts.Models.GameModel
upgradeModels
Il2CppAssets.Scripts.Models.Towers.Upgrades.UpgradeModel[]
Create a single BloonEmission
public static BloonEmissionModel CreateBloonEmission(this GameModel model, string bloonName, float time);
model
Il2CppAssets.Scripts.Models.GameModel
the GameModel instance
bloonName
System.String
Name of this bloon. Example: "Red"
time
System.Single
Time the bloon should be spawned
Il2CppAssets.Scripts.Models.Rounds.BloonEmissionModel
Create a BloonEmissionModel from a bloonModel
public static Il2CppReferenceArray<BloonEmissionModel> CreateBloonEmissions(this GameModel model, BloonModel bloonModel, int number, float spacing);
model
Il2CppAssets.Scripts.Models.GameModel
the GameModel instance
bloonModel
Il2CppAssets.Scripts.Models.Bloons.BloonModel
The bloon model that these bloons should be
number
System.Int32
Number of Bloons in this emission
spacing
System.Single
Space between each bloon in this emission
Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppReferenceArray
Create a BloonEmissionModel from a bloon's name
public static Il2CppReferenceArray<BloonEmissionModel> CreateBloonEmissions(this GameModel model, string bloonName, int number, float spacing);
model
Il2CppAssets.Scripts.Models.GameModel
the GameModel instance
bloonName
System.String
Name of bloon. Example: "Red"
number
System.Int32
Number of Bloons in this emission
spacing
System.Single
Space between each bloon in this emission
Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppReferenceArray
Creates a BloonGroup
public static BloonGroupModel CreateBloonGroup(this GameModel model, string bloonName, float startTime, float spacing, int count);
model
Il2CppAssets.Scripts.Models.GameModel
bloonName
System.String
startTime
System.Single
spacing
System.Single
count
System.Int32
Il2CppAssets.Scripts.Models.Rounds.BloonGroupModel
Returns whether or not a bloon exists with this name
public static bool DoesBloonExist(this GameModel gameModel, string bloonName);
gameModel
Il2CppAssets.Scripts.Models.GameModel
bloonName
System.String
Returns whether or not any TowerDetailsModels in Il2CppAssets.Scripts.Models.GameModel.towerSet have towerId
in it's name
public static bool DoesTowerDetailsExist(this GameModel model, string towerId);
model
Il2CppAssets.Scripts.Models.GameModel
towerId
System.String
Returns whether or not any TowerModels in Il2CppAssets.Scripts.Models.GameModel.towers have towerId
in it's name
public static bool DoesTowerModelExist(this GameModel model, string towerId);
model
Il2CppAssets.Scripts.Models.GameModel
towerId
System.String
Return all AbilityModels from every TowerModel in the game
public static System.Collections.Generic.List<AbilityModel> GetAllAbilityModels(this GameModel model);
model
Il2CppAssets.Scripts.Models.GameModel
System.Collections.Generic.List<Il2CppAssets.Scripts.Models.Towers.Behaviors.Abilities.AbilityModel>
Return all AttackModels from every TowerModel in the game
public static System.Collections.Generic.IEnumerable<AttackModel> GetAllAttackModels(this GameModel model);
model
Il2CppAssets.Scripts.Models.GameModel
System.Collections.Generic.IEnumerable<Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.AttackModel>
Return all ProjectileModels from every TowerModel in the game
public static System.Collections.Generic.List<ProjectileModel> GetAllProjectileModels(this GameModel model);
model
Il2CppAssets.Scripts.Models.GameModel
System.Collections.Generic.List<Il2CppAssets.Scripts.Models.Towers.Projectiles.ProjectileModel>
Return all ShopTowerDetailModels
public static List<ShopTowerDetailsModel> GetAllShopTowerDetails(this GameModel model);
model
Il2CppAssets.Scripts.Models.GameModel
Il2CppSystem.Collections.Generic.List
Return all TowerDetailModels
public static List<TowerDetailsModel> GetAllTowerDetails(this GameModel model);
model
Il2CppAssets.Scripts.Models.GameModel
Il2CppSystem.Collections.Generic.List
Return all WeaponModels from every AttackModel in the game
public static System.Collections.Generic.List<WeaponModel> GetAllWeaponModels(this GameModel model);
model
Il2CppAssets.Scripts.Models.GameModel
System.Collections.Generic.List<Il2CppAssets.Scripts.Models.Towers.Weapons.WeaponModel>
Returns the first TowerDetailsModel in Il2CppAssets.Scripts.Models.GameModel.towerSet that has a towerId of
towerDetailsName
public static TowerDetailsModel GetTowerDetails(this GameModel model, string towerDetailsName);
model
Il2CppAssets.Scripts.Models.GameModel
towerDetailsName
System.String
The Il2CppAssets.Scripts.Models.TowerSets.TowerDetailsModel.towerId you are searching for
Il2CppAssets.Scripts.Models.TowerSets.TowerDetailsModel
The first TowerDetailsModel found, otherwise returns null
Get a TowerModel from model.towers.
NOTE: model.GetTower cannot get custom towers so use this method instead
public static TowerModel GetTowerModel(this GameModel model, string towerId, int path1=0, int path2=0, int path3=0);
model
Il2CppAssets.Scripts.Models.GameModel
towerId
System.String
path1
System.Int32
path2
System.Int32
path3
System.Int32
Il2CppAssets.Scripts.Models.Towers.TowerModel
Return all TowerModels with a specific base id
public static System.Collections.Generic.List<TowerModel> GetTowerModels(this GameModel model, string towerBaseId);
model
Il2CppAssets.Scripts.Models.GameModel
the GameModel instance
towerBaseId
System.String
The base id all towers should share. Example: "DartMonkey"
System.Collections.Generic.List<Il2CppAssets.Scripts.Models.Towers.TowerModel>
Return all TowerModels that have at least one AbilityModel
public static System.Collections.Generic.List<TowerModel> GetTowerModelsWithAbilities(this GameModel model);
model
Il2CppAssets.Scripts.Models.GameModel
System.Collections.Generic.List<Il2CppAssets.Scripts.Models.Towers.TowerModel>