Skip to Main Content

BTD_Mod_Helper​.Extensions​.EntityBehaviorExt


BloonsTD6 Mod Helper

BTD_Mod_Helper.Extensions

EntityBehaviorExt Class

Behavior extensions for Entities

public static class EntityBehaviorExt

Inheritance System.Object  EntityBehaviorExt

Methods

EntityBehaviorExt.AddBehavior(this Entity, T) Method

Add a Behavior to this

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

Type parameters

T

The Behavior you want to add

Parameters

entity Il2CppAssets.Scripts.Simulation.Objects.Entity

behavior T

EntityBehaviorExt.GetBehavior(this Entity) Method

Return the first Behavior of type T

public static T GetBehavior<T>(this Entity entity)
    where T : Model;

Type parameters

T

The Behavior you want

Parameters

entity Il2CppAssets.Scripts.Simulation.Objects.Entity

Returns

T

EntityBehaviorExt.GetBehaviors(this Entity) Method

Return all Behaviors of type T

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

Type parameters

T

The Behavior you want

Parameters

entity Il2CppAssets.Scripts.Simulation.Objects.Entity

Returns

System.Collections.Generic.List<T>

EntityBehaviorExt.HasBehavior(this Entity) Method

Check if this has a specific Behavior

public static bool HasBehavior<T>(this Entity entity)
    where T : Model;

Type parameters

T

The Behavior you're checking for

Parameters

entity Il2CppAssets.Scripts.Simulation.Objects.Entity

Returns

System.Boolean

EntityBehaviorExt.RemoveBehavior(this Entity, T) Method

Remove the first Behavior of type T

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

Type parameters

T

The Behavior you want to remove

Parameters

entity Il2CppAssets.Scripts.Simulation.Objects.Entity

behavior T

EntityBehaviorExt.RemoveBehavior(this Entity) Method

Remove the first Behavior of Type T

public static void RemoveBehavior<T>(this Entity entity)
    where T : Model;

Type parameters

T

The Behavior you want to remove

Parameters

entity Il2CppAssets.Scripts.Simulation.Objects.Entity

EntityBehaviorExt.RemoveBehaviors(this Entity) Method

Remove all Behaviors of type T

public static void RemoveBehaviors<T>(this Entity entity)
    where T : Model;

Type parameters

T

The Behavior you want to remove

Parameters

entity Il2CppAssets.Scripts.Simulation.Objects.Entity

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