Table of Contents
Extensions for AttackModels
public static class AttackModelExt
Inheritance System.Object AttackModelExt
Adds a new filter to this projectile model
public static void AddFilter(this AttackModel attack, FilterModel filter);
attack
Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.AttackModel
filter
Il2CppAssets.Scripts.Models.Towers.Filters.FilterModel
Add a weapon to this Attack Model
public static void AddWeapon(this AttackModel attackModel, WeaponModel weaponToAdd);
attackModel
Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.AttackModel
this
weaponToAdd
Il2CppAssets.Scripts.Models.Towers.Weapons.WeaponModel
Weapon to add
Applies the given ModDisplay to the index'th (or first) DisplayModel in the behaviors of the AttackModel.
If there are no DisplayModels, then this does nothing
public static void ApplyDisplay<T>(this AttackModel attackModel, int index=0)
where T : BTD_Mod_Helper.Api.Display.ModDisplay;
T
attackModel
Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.AttackModel
index
System.Int32
Recursively get all ProjectileModels for this attack model and all of it's weapons
public static System.Collections.Generic.List<ProjectileModel> GetAllProjectiles(this AttackModel attackModel);
attackModel
Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.AttackModel
System.Collections.Generic.List<Il2CppAssets.Scripts.Models.Towers.Projectiles.ProjectileModel>
Removes a specific filter from this attack model
public static void RemoveFilter(this AttackModel attack, FilterModel filter);
attack
Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.AttackModel
filter
Il2CppAssets.Scripts.Models.Towers.Filters.FilterModel
Removes the first filter of a given type from this attack model
public static void RemoveFilter<T>(this AttackModel attack)
where T : FilterModel;
T
attack
Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.AttackModel
Remove a weapon from this Attack Model
public static void RemoveWeapon(this AttackModel attackModel, WeaponModel weaponToRemove);
attackModel
Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.AttackModel
this
weaponToRemove
Il2CppAssets.Scripts.Models.Towers.Weapons.WeaponModel
Weapon to remove
Sets the weapon at the given index (default 0) of this attack model to be the given one.
public static void SetWeapon(this AttackModel attackModel, WeaponModel weaponModel, int index=0);
attackModel
Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.AttackModel
this
weaponModel
Il2CppAssets.Scripts.Models.Towers.Weapons.WeaponModel
Weapon to add
index
System.Int32
Index within weapons array
System.ArgumentException
thrown when index < 0