Skip to Main Content
Table of Contents

BTD_Mod_Helper​.Extensions​.AttackFilterModelExt


BloonsTD6 Mod Helper

BTD_Mod_Helper.Extensions

AttackFilterModelExt Class

Extensions for AttackFilterModels

public static class AttackFilterModelExt

Inheritance System.Object  AttackFilterModelExt

Methods

AttackFilterModelExt.AddFilter(this AttackFilterModel, ModelHelper) Method

Adds a wrapped behavior from a ModelHelper to this tower

public static void AddFilter(this AttackFilterModel model, BTD_Mod_Helper.Api.Helpers.ModelHelper behavior);

Parameters

model Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.Behaviors.AttackFilterModel

behavior ModelHelper

AttackFilterModelExt.AddFilter(this AttackFilterModel, T) Method

Add a Behavior to this model

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

Type parameters

T

Parameters

model Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.Behaviors.AttackFilterModel

behavior T

AttackFilterModelExt.GetFilter(this AttackFilterModel, int) Method

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

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

Type parameters

T

The Behavior you want

Parameters

model Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.Behaviors.AttackFilterModel

index System.Int32

Returns

T

AttackFilterModelExt.GetFilter(this AttackFilterModel, string) Method

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

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

Type parameters

T

The Behavior you want

Parameters

model Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.Behaviors.AttackFilterModel

nameContains System.String

Returns

T

AttackFilterModelExt.GetFilter(this AttackFilterModel) Method

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

public static T GetFilter<T>(this AttackFilterModel model)
    where T : Model;

Type parameters

T

The Behavior you want

Parameters

model Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.Behaviors.AttackFilterModel

Returns

T

AttackFilterModelExt.GetFilters(this AttackFilterModel) Method

Return all Behaviors of type T

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

Type parameters

T

The Behavior you want

Parameters

model Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.Behaviors.AttackFilterModel

Returns

System.Collections.Generic.List<T>

AttackFilterModelExt.HasFilter(this AttackFilterModel, string, T) Method

Check if this has a specific named Behavior and return it

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

Type parameters

T

The Behavior you're checking for

Parameters

model Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.Behaviors.AttackFilterModel

nameContains System.String

behavior T

Returns

System.Boolean

AttackFilterModelExt.HasFilter(this AttackFilterModel, string) Method

Check if this has a specific named Behavior and return it

public static bool HasFilter<T>(this AttackFilterModel model, string nameContains)
    where T : Model;

Type parameters

T

The Behavior you're checking for

Parameters

model Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.Behaviors.AttackFilterModel

nameContains System.String

Returns

System.Boolean

AttackFilterModelExt.HasFilter(this AttackFilterModel, T) Method

Check if this has a specific Behavior and return it

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

Type parameters

T

The Behavior you're checking for

Parameters

model Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.Behaviors.AttackFilterModel

behavior T

Returns

System.Boolean

AttackFilterModelExt.HasFilter(this AttackFilterModel) Method

Check if this has a specific Behavior

public static bool HasFilter<T>(this AttackFilterModel model)
    where T : Model;

Type parameters

T

The Behavior you're checking for

Parameters

model Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.Behaviors.AttackFilterModel

Returns

System.Boolean

AttackFilterModelExt.RemoveFilter(this AttackFilterModel) Method

Remove all Behaviors of type T

public static void RemoveFilter(this AttackFilterModel model);

Parameters

model Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.Behaviors.AttackFilterModel

AttackFilterModelExt.RemoveFilter(this AttackFilterModel, int) Method

Remove the index'th Behavior of Type T

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

Type parameters

T

The Behavior you want to remove

Parameters

model Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.Behaviors.AttackFilterModel

index System.Int32

AttackFilterModelExt.RemoveFilter(this AttackFilterModel, string) Method

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

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

Type parameters

T

The Behavior you want to remove

Parameters

model Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.Behaviors.AttackFilterModel

nameContains System.String

AttackFilterModelExt.RemoveFilter(this AttackFilterModel, T) Method

Removes a specific behavior from a tower

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

Type parameters

T

Parameters

model Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.Behaviors.AttackFilterModel

behavior T

AttackFilterModelExt.RemoveFilter(this AttackFilterModel) Method

Remove the first Behavior of Type T

public static void RemoveFilter<T>(this AttackFilterModel model)
    where T : Model;

Type parameters

T

The Behavior you want to remove

Parameters

model Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.Behaviors.AttackFilterModel

AttackFilterModelExt.RemoveFilters(this AttackFilterModel) Method

Remove all Behaviors of type T

public static void RemoveFilters<T>(this AttackFilterModel model)
    where T : Model;

Type parameters

T

Parameters

model Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.Behaviors.AttackFilterModel