Extensions for TowerModels
public static class TowerModelExt
Inheritance System.Object TowerModelExt
Format's the tower's name with its tiers
public static void AddTiersToName(this TowerModel towerModel);
towerModel Il2CppAssets.Scripts.Models.Towers.TowerModel
Format's the tower's name with its tiers
public static void AddTiersToName(this TowerModel towerModel, int tier1, int tier2, int tier3);
towerModel Il2CppAssets.Scripts.Models.Towers.TowerModel
tier1 System.Int32
tier2 System.Int32
tier3 System.Int32
Applies a given ModDisplay to this TowerModel
public static void ApplyDisplay<T>(this TowerModel towerModel)
where T : BTD_Mod_Helper.Api.Display.ModDisplay;
T
The type of ModDisplay
towerModel Il2CppAssets.Scripts.Models.Towers.TowerModel
Return all AbilityModel behaviors from this tower, if it has any
public static System.Collections.Generic.List<AbilityModel> GetAbilities(this TowerModel towerModel);
towerModel Il2CppAssets.Scripts.Models.Towers.TowerModel
System.Collections.Generic.List<Il2CppAssets.Scripts.Models.Towers.Behaviors.Abilities.AbilityModel>
Return the first ability on the tower
public static AbilityModel GetAbility(this TowerModel towerModel);
towerModel Il2CppAssets.Scripts.Models.Towers.TowerModel
Il2CppAssets.Scripts.Models.Towers.Behaviors.Abilities.AbilityModel
Return a specific Ability of the tower.
public static AbilityModel GetAbility(this TowerModel towerModel, int index);
towerModel Il2CppAssets.Scripts.Models.Towers.TowerModel
the TowerModel
index System.Int32
Index of the ability you want.
Il2CppAssets.Scripts.Models.Towers.Behaviors.Abilities.AbilityModel
Return all TowerToSimulations with this TowerModel
public static System.Collections.Generic.List<TowerToSimulation> GetAllTowerToSim(this TowerModel towerModel);
towerModel Il2CppAssets.Scripts.Models.Towers.TowerModel
System.Collections.Generic.List<Il2CppAssets.Scripts.Unity.Bridge.TowerToSimulation>
Return all UpgradeModels that are currently applied to this TowerModel
public static System.Collections.Generic.List<UpgradeModel> GetAppliedUpgrades(this TowerModel towerModel);
towerModel Il2CppAssets.Scripts.Models.Towers.TowerModel
System.Collections.Generic.List<Il2CppAssets.Scripts.Models.Towers.Upgrades.UpgradeModel>
Return the first AttackModel from this TowerModel, if it has one
public static AttackModel GetAttackModel(this TowerModel towerModel);
towerModel Il2CppAssets.Scripts.Models.Towers.TowerModel
Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.AttackModel
Return one of the AttackModels from this TowerModel. By default will give the first AttackModel
public static AttackModel GetAttackModel(this TowerModel towerModel, int index);
towerModel Il2CppAssets.Scripts.Models.Towers.TowerModel
The TowerModel
index System.Int32
Index of the AttackModel you want
Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.AttackModel
Return the first AttackModel whose name contains the given string
public static AttackModel GetAttackModel(this TowerModel towerModel, string nameContains);
towerModel Il2CppAssets.Scripts.Models.Towers.TowerModel
nameContains System.String
Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.AttackModel
Return all AttackModel behaviors for this TowerModel
public static System.Collections.Generic.List<AttackModel> GetAttackModels(this TowerModel towerModel);
towerModel Il2CppAssets.Scripts.Models.Towers.TowerModel
System.Collections.Generic.List<Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.AttackModel>
Get the name of the BaseTower. Will be different from this TowerModel's name if this TowerModel isn't a BaseTower
public static string GetBaseId(this TowerModel towerModel);
towerModel Il2CppAssets.Scripts.Models.Towers.TowerModel
If this TowerModel is a Hero, return the HeroModel behavior
public static HeroModel GetHeroModel(this TowerModel towerModel);
towerModel Il2CppAssets.Scripts.Models.Towers.TowerModel
Il2CppAssets.Scripts.Models.Towers.Behaviors.HeroModel
Return the number position of this TowerModel in the list of all tower models
public static int GetIndex(this TowerModel towerModel);
towerModel Il2CppAssets.Scripts.Models.Towers.TowerModel
Gets the ModTower associated with this TowerModel
If there is no associated ModTower, returns null
public static BTD_Mod_Helper.Api.Towers.ModTower GetModTower(this TowerModel towerModel);
towerModel Il2CppAssets.Scripts.Models.Towers.TowerModel
Gets the specific ModTower associated with this TowerModel
If there is no associated ModTower, returns null
public static T GetModTower<T>(this TowerModel towerModel)
where T : BTD_Mod_Helper.Api.Towers.ModTower;
T
towerModel Il2CppAssets.Scripts.Models.Towers.TowerModel
Return all TowerDetailModels that share a base id with this towerModel
public static TowerDetailsModel GetTowerDetailsModel(this TowerModel towerModel);
towerModel Il2CppAssets.Scripts.Models.Towers.TowerModel
Il2CppAssets.Scripts.Models.TowerSets.TowerDetailsModel
Get the TowerId of this TowerModel. Equivalent to towerModel.name
public static string GetTowerId(this TowerModel towerModel);
towerModel Il2CppAssets.Scripts.Models.Towers.TowerModel
Return the TowerPurchaseButton for this TowerModel.
public static TowerPurchaseButton GetTowerPurchaseButton(this TowerModel towerModel);
towerModel Il2CppAssets.Scripts.Models.Towers.TowerModel
Il2CppAssets.Scripts.Unity.UI_New.InGame.StoreMenu.TowerPurchaseButton
Gets the tower set (vanilla or modded) of this tower in the form of a string
public static string GetTowerSet(this TowerModel towerModel);
towerModel Il2CppAssets.Scripts.Models.Towers.TowerModel
Return the UpgradeModel for a specific upgrade path/tier
public static UpgradeModel GetUpgrade(this TowerModel towerModel, int path, int tier);
towerModel Il2CppAssets.Scripts.Models.Towers.TowerModel
path System.Int32
tier System.Int32
Il2CppAssets.Scripts.Models.Towers.Upgrades.UpgradeModel
Return the current upgrade level of a specific path
public static int GetUpgradeLevel(this TowerModel towerModel, int path);
towerModel Il2CppAssets.Scripts.Models.Towers.TowerModel
the TowerModel
path System.Int32
What tier of upgrade is currently applied to tower
Return the first WeaponModel this TowerModel has, if it has one.
public static WeaponModel GetWeapon(this TowerModel towerModel);
towerModel Il2CppAssets.Scripts.Models.Towers.TowerModel
Il2CppAssets.Scripts.Models.Towers.Weapons.WeaponModel
Return one of the WeaponModels this TowerModel has. By default will return the first one
public static WeaponModel GetWeapon(this TowerModel towerModel, int index);
towerModel Il2CppAssets.Scripts.Models.Towers.TowerModel
The TowerModel
index System.Int32
Index of WeaponModel that you want
Il2CppAssets.Scripts.Models.Towers.Weapons.WeaponModel
Recursively get every WeaponModels this TowerModel has
public static System.Collections.Generic.List<WeaponModel> GetWeapons(this TowerModel towerModel);
towerModel Il2CppAssets.Scripts.Models.Towers.TowerModel
System.Collections.Generic.List<Il2CppAssets.Scripts.Models.Towers.Weapons.WeaponModel>
Check if this tower has speficif upgrade tiers
public static bool HasTiers(this TowerModel towerModel, int tier1=0, int tier2=0, int tier3=0);
towerModel Il2CppAssets.Scripts.Models.Towers.TowerModel
tier1 System.Int32
tier2 System.Int32
tier3 System.Int32
Check if an upgrade has been applied
public static bool HasUpgrade(this TowerModel towerModel, int path, int tier);
towerModel Il2CppAssets.Scripts.Models.Towers.TowerModel
path System.Int32
tier System.Int32
Check if an upgrade has been applied
public static bool HasUpgrade(this TowerModel towerModel, UpgradeModel upgradeModel);
towerModel Il2CppAssets.Scripts.Models.Towers.TowerModel
upgradeModel Il2CppAssets.Scripts.Models.Towers.Upgrades.UpgradeModel
Increase the range of a tower and all its attacks by the given amount
public static void IncreaseRange(this TowerModel towerModel, float rangeIncrease);
towerModel Il2CppAssets.Scripts.Models.Towers.TowerModel
rangeIncrease System.Single
If this TowerModel is for a Hero, is this Hero unlocked?
public static System.Nullable<bool> IsHeroUnlocked(this TowerModel towerModel);
towerModel Il2CppAssets.Scripts.Models.Towers.TowerModel
System.Nullable<System.Boolean>
Has player already unlocked this TowerModel
public static System.Nullable<bool> IsTowerUnlocked(this TowerModel towerModel);
towerModel Il2CppAssets.Scripts.Models.Towers.TowerModel
System.Nullable<System.Boolean>
Check if a specific upgrade path is being used/ has any upgrades applied to it
public static bool IsUpgradePathUsed(this TowerModel towerModel, int path);
towerModel Il2CppAssets.Scripts.Models.Towers.TowerModel
the TowerModel
path System.Int32
Upgrade path to check
Has a specific upgrade for this TowerModel been unlocked already?
public static System.Nullable<bool> IsUpgradeUnlocked(this TowerModel towerModel, int path, int tier);
towerModel Il2CppAssets.Scripts.Models.Towers.TowerModel
the TowerModel
path System.Int32
Upgrade path
tier System.Int32
Tier of upgrade
System.Nullable<System.Boolean>
Gets whether a Tower/Hero is a base one added by the vanilla game.
public static bool IsVanillaTower(this TowerModel towerModel);
towerModel Il2CppAssets.Scripts.Models.Towers.TowerModel
Duplicate this TowerModel with a unique name. Very useful for making custom TowerModels
public static TowerModel MakeCopy(this TowerModel towerModel, string newTowerId, bool addToGame=false, string newBaseId=null);
towerModel Il2CppAssets.Scripts.Models.Towers.TowerModel
newTowerId System.String
Set's the new towerId of this copy. By default the baseId will be set to this as well
addToGame System.Boolean
newBaseId System.String
Specify a new baseId. Set this if you want a baseId other than the newTowerId
Il2CppAssets.Scripts.Models.Towers.TowerModel
Sell every tower that uses this TowerModel
public static void SellAll(this TowerModel towerModel);
towerModel Il2CppAssets.Scripts.Models.Towers.TowerModel
Not Tested. Use to set the maximum allowed number of this tower
public static void SetMaxAmount(this TowerModel towerModel, int max);
towerModel Il2CppAssets.Scripts.Models.Towers.TowerModel
max System.Int32
Sets a TowerModel's tiers
public static void SetTiers(this TowerModel towerModel, int tier1=0, int tier2=0, int tier3=0, bool addToTowerName=false);
towerModel Il2CppAssets.Scripts.Models.Towers.TowerModel
tier1 System.Int32
tier2 System.Int32
tier3 System.Int32
addToTowerName System.Boolean