Skip to Main Content

BTD_Mod_Helper​.Extensions​.PetModelBehaviorExt


BloonsTD6 Mod Helper

BTD_Mod_Helper.Extensions

PetModelBehaviorExt Class

Extensions for PetModels

public static class PetModelBehaviorExt

Inheritance System.Object  PetModelBehaviorExt

Methods

PetModelBehaviorExt.AddBehavior(this PetModel, T) Method

Add a Behavior to this model

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

Type parameters

T

Parameters

model Il2CppAssets.Scripts.Models.Towers.Pets.PetModel

behavior T

PetModelBehaviorExt.GetBehavior(this PetModel) Method

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

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

Type parameters

T

The Behavior you want

Parameters

model Il2CppAssets.Scripts.Models.Towers.Pets.PetModel

Returns

T

PetModelBehaviorExt.GetBehaviors(this PetModel) Method

Return all Behaviors of type T

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

Type parameters

T

The Behavior you want

Parameters

model Il2CppAssets.Scripts.Models.Towers.Pets.PetModel

Returns

System.Collections.Generic.List<T>

PetModelBehaviorExt.HasBehavior(this PetModel) Method

Check if this has a specific Behavior

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

Type parameters

T

The Behavior you're checking for

Parameters

model Il2CppAssets.Scripts.Models.Towers.Pets.PetModel

Returns

System.Boolean

PetModelBehaviorExt.RemoveBehavior(this PetModel, T) Method

Removes a specific behavior from a tower

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

Type parameters

T

Parameters

model Il2CppAssets.Scripts.Models.Towers.Pets.PetModel

behavior T

PetModelBehaviorExt.RemoveBehavior(this PetModel) Method

Remove the first Behavior of Type T

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

Type parameters

T

The Behavior you want to remove

Parameters

model Il2CppAssets.Scripts.Models.Towers.Pets.PetModel

PetModelBehaviorExt.RemoveBehaviors(this PetModel) Method

Remove all Behaviors of type T

public static void RemoveBehaviors(this PetModel model);

Parameters

model Il2CppAssets.Scripts.Models.Towers.Pets.PetModel

PetModelBehaviorExt.RemoveBehaviors(this PetModel) Method

Remove all Behaviors of type T

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

Type parameters

T

Parameters

model Il2CppAssets.Scripts.Models.Towers.Pets.PetModel

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