Skip to Main Content

BTD_Mod_Helper​.Extensions​.TowerModelBehaviorExt


BloonsTD6 Mod Helper

BTD_Mod_Helper.Extensions

TowerModelBehaviorExt Class

Extensions for TowerModels

public static class TowerModelBehaviorExt

Inheritance System.Object  TowerModelBehaviorExt

Methods

TowerModelBehaviorExt.AddBehavior(this TowerModel, ModelHelper) Method

Adds a wrapped behavior from a ModelHelper to this tower

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

Parameters

model Il2CppAssets.Scripts.Models.Towers.TowerModel

behavior ModelHelper

TowerModelBehaviorExt.AddBehavior(this TowerModel, T) Method

Add a Behavior to this model

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

Type parameters

T

Parameters

model Il2CppAssets.Scripts.Models.Towers.TowerModel

behavior T

TowerModelBehaviorExt.GetBehavior(this TowerModel) Method

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

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

Type parameters

T

The Behavior you want

Parameters

model Il2CppAssets.Scripts.Models.Towers.TowerModel

Returns

T

TowerModelBehaviorExt.GetBehavior(this TowerModel, int) Method

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

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

Type parameters

T

The Behavior you want

Parameters

model Il2CppAssets.Scripts.Models.Towers.TowerModel

index System.Int32

Returns

T

TowerModelBehaviorExt.GetBehavior(this TowerModel, string) Method

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

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

Type parameters

T

The Behavior you want

Parameters

model Il2CppAssets.Scripts.Models.Towers.TowerModel

nameContains System.String

Returns

T

TowerModelBehaviorExt.GetBehaviors(this TowerModel) Method

Return all Behaviors of type T

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

Type parameters

T

The Behavior you want

Parameters

model Il2CppAssets.Scripts.Models.Towers.TowerModel

Returns

System.Collections.Generic.List<T>

TowerModelBehaviorExt.HasBehavior(this TowerModel) Method

Check if this has a specific Behavior

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

Type parameters

T

The Behavior you're checking for

Parameters

model Il2CppAssets.Scripts.Models.Towers.TowerModel

Returns

System.Boolean

TowerModelBehaviorExt.HasBehavior(this TowerModel, string, T) Method

Check if this has a specific named Behavior and return it

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

Type parameters

T

The Behavior you're checking for

Parameters

model Il2CppAssets.Scripts.Models.Towers.TowerModel

nameContains System.String

behavior T

Returns

System.Boolean

TowerModelBehaviorExt.HasBehavior(this TowerModel, T) Method

Check if this has a specific Behavior and return it

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

Type parameters

T

The Behavior you're checking for

Parameters

model Il2CppAssets.Scripts.Models.Towers.TowerModel

behavior T

Returns

System.Boolean

TowerModelBehaviorExt.RemoveBehavior(this TowerModel) Method

Remove the first Behavior of Type T

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

Type parameters

T

The Behavior you want to remove

Parameters

model Il2CppAssets.Scripts.Models.Towers.TowerModel

TowerModelBehaviorExt.RemoveBehavior(this TowerModel, int) Method

Remove the index'th Behavior of Type T

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

Type parameters

T

The Behavior you want to remove

Parameters

model Il2CppAssets.Scripts.Models.Towers.TowerModel

index System.Int32

TowerModelBehaviorExt.RemoveBehavior(this TowerModel, string) Method

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

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

Type parameters

T

The Behavior you want to remove

Parameters

model Il2CppAssets.Scripts.Models.Towers.TowerModel

nameContains System.String

TowerModelBehaviorExt.RemoveBehavior(this TowerModel, T) Method

Removes a specific behavior from a tower

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

Type parameters

T

Parameters

model Il2CppAssets.Scripts.Models.Towers.TowerModel

behavior T

TowerModelBehaviorExt.RemoveBehaviors(this TowerModel) Method

Remove all Behaviors of type T

public static void RemoveBehaviors(this TowerModel model);

Parameters

model Il2CppAssets.Scripts.Models.Towers.TowerModel

TowerModelBehaviorExt.RemoveBehaviors(this TowerModel) Method

Remove all Behaviors of type T

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

Type parameters

T

Parameters

model Il2CppAssets.Scripts.Models.Towers.TowerModel

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