Skip to Main Content

BTD_Mod_Helper​.Extensions​.TowerModelBehaviorExt


BloonsTD6 Mod Helper

BTD_Mod_Helper.Extensions

TowerModelBehaviorExt Class

Behavior 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

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

Type parameters

T

The Behavior you want to add

Parameters

model Il2CppAssets.Scripts.Models.Towers.TowerModel

behavior T

TowerModelBehaviorExt.GetBehavior(this TowerModel) Method

Return the first Behavior of type T

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.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, T) Method

Check if this has a specific Behavior

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.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.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

The Behavior you want to remove

Parameters

model Il2CppAssets.Scripts.Models.Towers.TowerModel

behavior T

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.RemoveBehaviors(this TowerModel) Method

Remove all Behaviors

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

The Behavior you want to remove

Parameters

model Il2CppAssets.Scripts.Models.Towers.TowerModel

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