Skip to Main Content

BTD_Mod_Helper​.Extensions​.PowerModelBehaviorExt


BloonsTD6 Mod Helper

BTD_Mod_Helper.Extensions

PowerModelBehaviorExt Class

Behavior extensions for PowerModels

public static class PowerModelBehaviorExt

Inheritance System.Object  PowerModelBehaviorExt

Methods

PowerModelBehaviorExt.AddBehavior(this PowerModel, T) Method

Add a Behavior to this model

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

Type parameters

T

Parameters

model Il2CppAssets.Scripts.Models.Powers.PowerModel

behavior T

PowerModelBehaviorExt.GetBehavior(this PowerModel) Method

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

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

Type parameters

T

The Behavior you want

Parameters

model Il2CppAssets.Scripts.Models.Powers.PowerModel

Returns

T

PowerModelBehaviorExt.GetBehaviors(this PowerModel) Method

Return all Behaviors of type T

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

Type parameters

T

The Behavior you want

Parameters

model Il2CppAssets.Scripts.Models.Powers.PowerModel

Returns

System.Collections.Generic.List<T>

PowerModelBehaviorExt.HasBehavior(this PowerModel) Method

Check if this has a specific Behavior

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

Type parameters

T

The Behavior you're checking for

Parameters

model Il2CppAssets.Scripts.Models.Powers.PowerModel

Returns

System.Boolean

PowerModelBehaviorExt.RemoveBehavior(this PowerModel, T) Method

Removes a specific behavior from a tower

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

Type parameters

T

Parameters

model Il2CppAssets.Scripts.Models.Powers.PowerModel

behavior T

PowerModelBehaviorExt.RemoveBehavior(this PowerModel) Method

Remove the first Behavior of Type T

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

Type parameters

T

The Behavior you want to remove

Parameters

model Il2CppAssets.Scripts.Models.Powers.PowerModel

PowerModelBehaviorExt.RemoveBehaviors(this PowerModel) Method

Remove all Behaviors of type T

public static void RemoveBehaviors(this PowerModel model);

Parameters

model Il2CppAssets.Scripts.Models.Powers.PowerModel

PowerModelBehaviorExt.RemoveBehaviors(this PowerModel) Method

Remove all Behaviors of type T

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

Type parameters

T

Parameters

model Il2CppAssets.Scripts.Models.Powers.PowerModel

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