Skip to Main Content

BTD_Mod_Helper​.Extensions​.BloonModelBehaviorExt


BloonsTD6 Mod Helper

BTD_Mod_Helper.Extensions

BloonModelBehaviorExt Class

Extensions for BloonModels

public static class BloonModelBehaviorExt

Inheritance System.Object  BloonModelBehaviorExt

Methods

BloonModelBehaviorExt.AddBehavior(this BloonModel, ModelHelper) Method

Adds a wrapped behavior from a ModelHelper to this tower

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

Parameters

model Il2CppAssets.Scripts.Models.Bloons.BloonModel

behavior ModelHelper

BloonModelBehaviorExt.AddBehavior(this BloonModel, T) Method

Add a Behavior to this model

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

Type parameters

T

Parameters

model Il2CppAssets.Scripts.Models.Bloons.BloonModel

behavior T

BloonModelBehaviorExt.GetBehavior(this BloonModel) Method

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

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

Type parameters

T

The Behavior you want

Parameters

model Il2CppAssets.Scripts.Models.Bloons.BloonModel

Returns

T

BloonModelBehaviorExt.GetBehavior(this BloonModel, int) Method

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

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

Type parameters

T

The Behavior you want

Parameters

model Il2CppAssets.Scripts.Models.Bloons.BloonModel

index System.Int32

Returns

T

BloonModelBehaviorExt.GetBehavior(this BloonModel, string) Method

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

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

Type parameters

T

The Behavior you want

Parameters

model Il2CppAssets.Scripts.Models.Bloons.BloonModel

nameContains System.String

Returns

T

BloonModelBehaviorExt.GetBehaviors(this BloonModel) Method

Return all Behaviors of type T

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

Type parameters

T

The Behavior you want

Parameters

model Il2CppAssets.Scripts.Models.Bloons.BloonModel

Returns

System.Collections.Generic.List<T>

BloonModelBehaviorExt.HasBehavior(this BloonModel) Method

Check if this has a specific Behavior

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

Type parameters

T

The Behavior you're checking for

Parameters

model Il2CppAssets.Scripts.Models.Bloons.BloonModel

Returns

System.Boolean

BloonModelBehaviorExt.HasBehavior(this BloonModel, string, T) Method

Check if this has a specific named Behavior and return it

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

Type parameters

T

The Behavior you're checking for

Parameters

model Il2CppAssets.Scripts.Models.Bloons.BloonModel

nameContains System.String

behavior T

Returns

System.Boolean

BloonModelBehaviorExt.HasBehavior(this BloonModel, T) Method

Check if this has a specific Behavior and return it

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

Type parameters

T

The Behavior you're checking for

Parameters

model Il2CppAssets.Scripts.Models.Bloons.BloonModel

behavior T

Returns

System.Boolean

BloonModelBehaviorExt.RemoveBehavior(this BloonModel) Method

Remove the first Behavior of Type T

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

Type parameters

T

The Behavior you want to remove

Parameters

model Il2CppAssets.Scripts.Models.Bloons.BloonModel

BloonModelBehaviorExt.RemoveBehavior(this BloonModel, int) Method

Remove the index'th Behavior of Type T

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

Type parameters

T

The Behavior you want to remove

Parameters

model Il2CppAssets.Scripts.Models.Bloons.BloonModel

index System.Int32

BloonModelBehaviorExt.RemoveBehavior(this BloonModel, string) Method

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

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

Type parameters

T

The Behavior you want to remove

Parameters

model Il2CppAssets.Scripts.Models.Bloons.BloonModel

nameContains System.String

BloonModelBehaviorExt.RemoveBehavior(this BloonModel, T) Method

Removes a specific behavior from a tower

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

Type parameters

T

Parameters

model Il2CppAssets.Scripts.Models.Bloons.BloonModel

behavior T

BloonModelBehaviorExt.RemoveBehaviors(this BloonModel) Method

Remove all Behaviors of type T

public static void RemoveBehaviors(this BloonModel model);

Parameters

model Il2CppAssets.Scripts.Models.Bloons.BloonModel

BloonModelBehaviorExt.RemoveBehaviors(this BloonModel) Method

Remove all Behaviors of type T

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

Type parameters

T

Parameters

model Il2CppAssets.Scripts.Models.Bloons.BloonModel

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