Skip to Main Content

BTD_Mod_Helper​.Extensions​.WeaponModelBehaviorExt


BloonsTD6 Mod Helper

BTD_Mod_Helper.Extensions

WeaponModelBehaviorExt Class

Extensions for WeaponModels

public static class WeaponModelBehaviorExt

Inheritance System.Object  WeaponModelBehaviorExt

Methods

WeaponModelBehaviorExt.AddBehavior(this WeaponModel, ModelHelper) Method

Adds a wrapped behavior from a ModelHelper to this tower

public static void AddBehavior(this WeaponModel model, BTD_Mod_Helper.Api.Helpers.ModelHelper behavior);

Parameters

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

behavior ModelHelper

WeaponModelBehaviorExt.AddBehavior(this WeaponModel, T) Method

Add a Behavior to this model

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

Type parameters

T

Parameters

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

behavior T

WeaponModelBehaviorExt.GetBehavior(this WeaponModel) Method

Return the first Behavior of type T, or null if there isn't one

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.GetBehavior(this WeaponModel, int) Method

Return the index'th Behavior of type T, or null

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

Type parameters

T

The Behavior you want

Parameters

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

index System.Int32

Returns

T

WeaponModelBehaviorExt.GetBehavior(this WeaponModel, string) Method

Return the first Behavior of type T whose name contains the given string, or null

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

Type parameters

T

The Behavior you want

Parameters

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

nameContains System.String

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.HasBehavior(this WeaponModel, string, T) Method

Check if this has a specific named Behavior and return it

public static bool HasBehavior<T>(this WeaponModel model, string nameContains, out T behavior)
    where T : Model;

Type parameters

T

The Behavior you're checking for

Parameters

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

nameContains System.String

behavior T

Returns

System.Boolean

WeaponModelBehaviorExt.HasBehavior(this WeaponModel, T) Method

Check if this has a specific Behavior and return it

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

Type parameters

T

The Behavior you're checking for

Parameters

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

behavior T

Returns

System.Boolean

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.RemoveBehavior(this WeaponModel, int) Method

Remove the index'th Behavior of Type T

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

Type parameters

T

The Behavior you want to remove

Parameters

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

index System.Int32

WeaponModelBehaviorExt.RemoveBehavior(this WeaponModel, string) Method

Remove the first Behavior of Type T whose name contains a certain string

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

Type parameters

T

The Behavior you want to remove

Parameters

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

nameContains System.String

WeaponModelBehaviorExt.RemoveBehavior(this WeaponModel, T) Method

Removes a specific behavior from a tower

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

Type parameters

T

Parameters

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

behavior T

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

Parameters

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

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