Skip to Main Content
Table of Contents

BTD_Mod_Helper​.Extensions​.ProjectileModelBehaviorExt


BloonsTD6 Mod Helper

BTD_Mod_Helper.Extensions

ProjectileModelBehaviorExt Class

Extensions for ProjectileModels

public static class ProjectileModelBehaviorExt

Inheritance System.Object  ProjectileModelBehaviorExt

Methods

ProjectileModelBehaviorExt.AddBehavior(this ProjectileModel, ModelHelper) Method

Adds a wrapped behavior from a ModelHelper to this tower

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

Parameters

model Il2CppAssets.Scripts.Models.Towers.Projectiles.ProjectileModel

behavior ModelHelper

ProjectileModelBehaviorExt.AddBehavior(this ProjectileModel, T) Method

Add a Behavior to this model

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

Type parameters

T

Parameters

model Il2CppAssets.Scripts.Models.Towers.Projectiles.ProjectileModel

behavior T

ProjectileModelBehaviorExt.GetBehavior(this ProjectileModel) Method

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

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

Type parameters

T

The Behavior you want

Parameters

model Il2CppAssets.Scripts.Models.Towers.Projectiles.ProjectileModel

Returns

T

ProjectileModelBehaviorExt.GetBehavior(this ProjectileModel, int) Method

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

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

Type parameters

T

The Behavior you want

Parameters

model Il2CppAssets.Scripts.Models.Towers.Projectiles.ProjectileModel

index System.Int32

Returns

T

ProjectileModelBehaviorExt.GetBehavior(this ProjectileModel, string) Method

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

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

Type parameters

T

The Behavior you want

Parameters

model Il2CppAssets.Scripts.Models.Towers.Projectiles.ProjectileModel

nameContains System.String

Returns

T

ProjectileModelBehaviorExt.GetBehaviors(this ProjectileModel) Method

Return all Behaviors of type T

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

Type parameters

T

The Behavior you want

Parameters

model Il2CppAssets.Scripts.Models.Towers.Projectiles.ProjectileModel

Returns

System.Collections.Generic.List<T>

ProjectileModelBehaviorExt.HasBehavior(this ProjectileModel) Method

Check if this has a specific Behavior

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

Type parameters

T

The Behavior you're checking for

Parameters

model Il2CppAssets.Scripts.Models.Towers.Projectiles.ProjectileModel

Returns

System.Boolean

ProjectileModelBehaviorExt.HasBehavior(this ProjectileModel, string, T) Method

Check if this has a specific named Behavior and return it

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

Type parameters

T

The Behavior you're checking for

Parameters

model Il2CppAssets.Scripts.Models.Towers.Projectiles.ProjectileModel

nameContains System.String

behavior T

Returns

System.Boolean

ProjectileModelBehaviorExt.HasBehavior(this ProjectileModel, T) Method

Check if this has a specific Behavior and return it

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

Type parameters

T

The Behavior you're checking for

Parameters

model Il2CppAssets.Scripts.Models.Towers.Projectiles.ProjectileModel

behavior T

Returns

System.Boolean

ProjectileModelBehaviorExt.RemoveBehavior(this ProjectileModel) Method

Remove the first Behavior of Type T

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

Type parameters

T

The Behavior you want to remove

Parameters

model Il2CppAssets.Scripts.Models.Towers.Projectiles.ProjectileModel

ProjectileModelBehaviorExt.RemoveBehavior(this ProjectileModel, int) Method

Remove the index'th Behavior of Type T

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

Type parameters

T

The Behavior you want to remove

Parameters

model Il2CppAssets.Scripts.Models.Towers.Projectiles.ProjectileModel

index System.Int32

ProjectileModelBehaviorExt.RemoveBehavior(this ProjectileModel, string) Method

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

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

Type parameters

T

The Behavior you want to remove

Parameters

model Il2CppAssets.Scripts.Models.Towers.Projectiles.ProjectileModel

nameContains System.String

ProjectileModelBehaviorExt.RemoveBehavior(this ProjectileModel, T) Method

Removes a specific behavior from a tower

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

Type parameters

T

Parameters

model Il2CppAssets.Scripts.Models.Towers.Projectiles.ProjectileModel

behavior T

ProjectileModelBehaviorExt.RemoveBehaviors(this ProjectileModel) Method

Remove all Behaviors of type T

public static void RemoveBehaviors(this ProjectileModel model);

Parameters

model Il2CppAssets.Scripts.Models.Towers.Projectiles.ProjectileModel

ProjectileModelBehaviorExt.RemoveBehaviors(this ProjectileModel) Method

Remove all Behaviors of type T

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

Type parameters

T

Parameters

model Il2CppAssets.Scripts.Models.Towers.Projectiles.ProjectileModel

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