Skip to Main Content

BTD_Mod_Helper​.Extensions​.WeaponModelBehaviorExt


BloonsTD6 Mod Helper

BTD_Mod_Helper.Extensions

WeaponModelBehaviorExt Class

Behavior extensions for WeaponModels

public static class WeaponModelBehaviorExt

Inheritance System.Object  WeaponModelBehaviorExt

Methods

WeaponModelBehaviorExt.AddBehavior(this WeaponModel, T) Method

Add a Behavior to this

public static void AddBehavior<T>(this WeaponModel model, T behavior)
    where T : WeaponBehaviorModel;

Type parameters

T

The Behavior you want to add

Parameters

model Il2CppAssets.Scripts.Models.Towers.Weapons.WeaponModel

behavior T

WeaponModelBehaviorExt.GetBehavior(this WeaponModel) Method

Return the first Behavior of type T

public static T GetBehavior<T>(this WeaponModel model)
    where T : Model;

Type parameters

T

The Behavior you want

Parameters

model Il2CppAssets.Scripts.Models.Towers.Weapons.WeaponModel

Returns

T

WeaponModelBehaviorExt.GetBehaviors(this WeaponModel) Method

Return all Behaviors of type T

public static System.Collections.Generic.List<T> GetBehaviors<T>(this WeaponModel model)
    where T : Model;

Type parameters

T

The Behavior you want

Parameters

model Il2CppAssets.Scripts.Models.Towers.Weapons.WeaponModel

Returns

System.Collections.Generic.List<T>

WeaponModelBehaviorExt.HasBehavior(this WeaponModel) Method

Check if this has a specific Behavior

public static bool HasBehavior<T>(this WeaponModel model)
    where T : Model;

Type parameters

T

The Behavior you're checking for

Parameters

model Il2CppAssets.Scripts.Models.Towers.Weapons.WeaponModel

Returns

System.Boolean

WeaponModelBehaviorExt.RemoveBehavior(this WeaponModel, T) Method

Remove the first Behavior of type T

public static void RemoveBehavior<T>(this WeaponModel model, T behavior)
    where T : Model;

Type parameters

T

The Behavior you want to remove

Parameters

model Il2CppAssets.Scripts.Models.Towers.Weapons.WeaponModel

behavior T

WeaponModelBehaviorExt.RemoveBehavior(this WeaponModel) Method

Remove the first Behavior of Type T

public static void RemoveBehavior<T>(this WeaponModel model)
    where T : Model;

Type parameters

T

The Behavior you want to remove

Parameters

model Il2CppAssets.Scripts.Models.Towers.Weapons.WeaponModel

WeaponModelBehaviorExt.RemoveBehaviors(this WeaponModel) Method

Remove all Behaviors of type T

public static void RemoveBehaviors(this WeaponModel model);

Parameters

model Il2CppAssets.Scripts.Models.Towers.Weapons.WeaponModel

WeaponModelBehaviorExt.RemoveBehaviors(this WeaponModel) Method

Remove all Behaviors of type T

public static void RemoveBehaviors<T>(this WeaponModel model)
    where T : Model;

Type parameters

T

The Behavior you want to remove

Parameters

model Il2CppAssets.Scripts.Models.Towers.Weapons.WeaponModel

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