Skip to Main Content

BTD_Mod_Helper​.Extensions​.AttackModelExt


BloonsTD6 Mod Helper

BTD_Mod_Helper.Extensions

AttackModelExt Class

Extensions for AttackModels

public static class AttackModelExt

Inheritance System.Object  AttackModelExt

Methods

AttackModelExt.AddFilter(this AttackModel, FilterModel) Method

Adds a new filter to this projectile model

public static void AddFilter(this AttackModel attack, FilterModel filter);

Parameters

attack Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.AttackModel

filter Il2CppAssets.Scripts.Models.Towers.Filters.FilterModel

AttackModelExt.AddWeapon(this AttackModel, WeaponModel) Method

Add a weapon to this Attack Model

public static void AddWeapon(this AttackModel attackModel, WeaponModel weaponToAdd);

Parameters

attackModel Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.AttackModel

this

weaponToAdd Il2CppAssets.Scripts.Models.Towers.Weapons.WeaponModel

Weapon to add

AttackModelExt.ApplyDisplay(this AttackModel, int) Method

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;

Type parameters

T

Parameters

attackModel Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.AttackModel

index System.Int32

AttackModelExt.GetAllProjectiles(this AttackModel) Method

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

Parameters

attackModel Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.AttackModel

Returns

System.Collections.Generic.List<Il2CppAssets.Scripts.Models.Towers.Projectiles.ProjectileModel>

AttackModelExt.RemoveFilter(this AttackModel, FilterModel) Method

Removes a specific filter from this attack model

public static void RemoveFilter(this AttackModel attack, FilterModel filter);

Parameters

attack Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.AttackModel

filter Il2CppAssets.Scripts.Models.Towers.Filters.FilterModel

AttackModelExt.RemoveFilter(this AttackModel) Method

Removes the first filter of a given type from this attack model

public static void RemoveFilter<T>(this AttackModel attack)
    where T : FilterModel;

Type parameters

T

Parameters

attack Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.AttackModel

AttackModelExt.RemoveWeapon(this AttackModel, WeaponModel) Method

Remove a weapon from this Attack Model

public static void RemoveWeapon(this AttackModel attackModel, WeaponModel weaponToRemove);

Parameters

attackModel Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.AttackModel

this

weaponToRemove Il2CppAssets.Scripts.Models.Towers.Weapons.WeaponModel

Weapon to remove

AttackModelExt.SetWeapon(this AttackModel, WeaponModel, int) Method

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

Parameters

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

Exceptions

System.ArgumentException
thrown when index < 0

To learn how to download BTD Mod Helper and install mods, click here