Skip to Main Content

BTD_Mod_Helper​.Extensions​.AbilityModelBehaviorExt


BloonsTD6 Mod Helper

BTD_Mod_Helper.Extensions

AbilityModelBehaviorExt Class

Extensions for AbilityModels

public static class AbilityModelBehaviorExt

Inheritance System.Object  AbilityModelBehaviorExt

Methods

AbilityModelBehaviorExt.AddBehavior(this AbilityModel, ModelHelper) Method

Adds a wrapped behavior from a ModelHelper to this tower

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

Parameters

model Il2CppAssets.Scripts.Models.Towers.Behaviors.Abilities.AbilityModel

behavior ModelHelper

AbilityModelBehaviorExt.AddBehavior(this AbilityModel, T) Method

Add a Behavior to this model

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

Type parameters

T

Parameters

model Il2CppAssets.Scripts.Models.Towers.Behaviors.Abilities.AbilityModel

behavior T

AbilityModelBehaviorExt.GetBehavior(this AbilityModel) Method

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

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

Type parameters

T

The Behavior you want

Parameters

model Il2CppAssets.Scripts.Models.Towers.Behaviors.Abilities.AbilityModel

Returns

T

AbilityModelBehaviorExt.GetBehavior(this AbilityModel, int) Method

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

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

Type parameters

T

The Behavior you want

Parameters

model Il2CppAssets.Scripts.Models.Towers.Behaviors.Abilities.AbilityModel

index System.Int32

Returns

T

AbilityModelBehaviorExt.GetBehavior(this AbilityModel, string) Method

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

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

Type parameters

T

The Behavior you want

Parameters

model Il2CppAssets.Scripts.Models.Towers.Behaviors.Abilities.AbilityModel

nameContains System.String

Returns

T

AbilityModelBehaviorExt.GetBehaviors(this AbilityModel) Method

Return all Behaviors of type T

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

Type parameters

T

The Behavior you want

Parameters

model Il2CppAssets.Scripts.Models.Towers.Behaviors.Abilities.AbilityModel

Returns

System.Collections.Generic.List<T>

AbilityModelBehaviorExt.HasBehavior(this AbilityModel) Method

Check if this has a specific Behavior

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

Type parameters

T

The Behavior you're checking for

Parameters

model Il2CppAssets.Scripts.Models.Towers.Behaviors.Abilities.AbilityModel

Returns

System.Boolean

AbilityModelBehaviorExt.HasBehavior(this AbilityModel, string, T) Method

Check if this has a specific named Behavior and return it

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

Type parameters

T

The Behavior you're checking for

Parameters

model Il2CppAssets.Scripts.Models.Towers.Behaviors.Abilities.AbilityModel

nameContains System.String

behavior T

Returns

System.Boolean

AbilityModelBehaviorExt.HasBehavior(this AbilityModel, T) Method

Check if this has a specific Behavior and return it

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

Type parameters

T

The Behavior you're checking for

Parameters

model Il2CppAssets.Scripts.Models.Towers.Behaviors.Abilities.AbilityModel

behavior T

Returns

System.Boolean

AbilityModelBehaviorExt.RemoveBehavior(this AbilityModel) Method

Remove the first Behavior of Type T

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

Type parameters

T

The Behavior you want to remove

Parameters

model Il2CppAssets.Scripts.Models.Towers.Behaviors.Abilities.AbilityModel

AbilityModelBehaviorExt.RemoveBehavior(this AbilityModel, int) Method

Remove the index'th Behavior of Type T

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

Type parameters

T

The Behavior you want to remove

Parameters

model Il2CppAssets.Scripts.Models.Towers.Behaviors.Abilities.AbilityModel

index System.Int32

AbilityModelBehaviorExt.RemoveBehavior(this AbilityModel, string) Method

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

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

Type parameters

T

The Behavior you want to remove

Parameters

model Il2CppAssets.Scripts.Models.Towers.Behaviors.Abilities.AbilityModel

nameContains System.String

AbilityModelBehaviorExt.RemoveBehavior(this AbilityModel, T) Method

Removes a specific behavior from a tower

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

Type parameters

T

Parameters

model Il2CppAssets.Scripts.Models.Towers.Behaviors.Abilities.AbilityModel

behavior T

AbilityModelBehaviorExt.RemoveBehaviors(this AbilityModel) Method

Remove all Behaviors of type T

public static void RemoveBehaviors(this AbilityModel model);

Parameters

model Il2CppAssets.Scripts.Models.Towers.Behaviors.Abilities.AbilityModel

AbilityModelBehaviorExt.RemoveBehaviors(this AbilityModel) Method

Remove all Behaviors of type T

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

Type parameters

T

Parameters

model Il2CppAssets.Scripts.Models.Towers.Behaviors.Abilities.AbilityModel

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