Skip to Main Content

BTD_Mod_Helper​.Extensions​.AttackBehaviorExt


BloonsTD6 Mod Helper

BTD_Mod_Helper.Extensions

AttackBehaviorExt Class

Behavior extensions for attacks

public static class AttackBehaviorExt

Inheritance System.Object  AttackBehaviorExt

Methods

AttackBehaviorExt.AddAttackBehavior(this Attack, T) Method

Add a Behavior to this

public static void AddAttackBehavior<T>(this Attack attack, T behavior)
    where T : AttackBehavior;

Type parameters

T

The Behavior you want to add

Parameters

attack Il2CppAssets.Scripts.Simulation.Towers.Behaviors.Attack.Attack

behavior T

AttackBehaviorExt.GetAttackBehavior(this Attack) Method

Return the first Behavior of type T

public static T GetAttackBehavior<T>(this Attack attack)
    where T : AttackBehavior;

Type parameters

T

The Behavior you want

Parameters

attack Il2CppAssets.Scripts.Simulation.Towers.Behaviors.Attack.Attack

Returns

T

AttackBehaviorExt.GetAttackBehaviors(this Attack) Method

Return all Behaviors of type T

public static System.Collections.Generic.List<T> GetAttackBehaviors<T>(this Attack attack)
    where T : AttackBehavior;

Type parameters

T

The Behavior you want

Parameters

attack Il2CppAssets.Scripts.Simulation.Towers.Behaviors.Attack.Attack

Returns

System.Collections.Generic.List<T>

AttackBehaviorExt.HasAttackBehavior(this Attack, T) Method

Check if this has a specific Behavior

public static bool HasAttackBehavior<T>(this Attack attack, out T item)
    where T : AttackBehavior;

Type parameters

T

The Behavior you're checking for

Parameters

attack Il2CppAssets.Scripts.Simulation.Towers.Behaviors.Attack.Attack

item T

The returned item, if it exists

Returns

System.Boolean

AttackBehaviorExt.HasAttackBehavior(this Attack) Method

Check if this has a specific Behavior

public static bool HasAttackBehavior<T>(this Attack attack)
    where T : AttackBehavior;

Type parameters

T

The Behavior you're checking for

Parameters

attack Il2CppAssets.Scripts.Simulation.Towers.Behaviors.Attack.Attack

Returns

System.Boolean

AttackBehaviorExt.RemoveAttackBehavior(this Attack, T) Method

Remove the first Behavior of type T

public static void RemoveAttackBehavior<T>(this Attack attack, T behavior)
    where T : AttackBehavior;

Type parameters

T

The Behavior you want to remove

Parameters

attack Il2CppAssets.Scripts.Simulation.Towers.Behaviors.Attack.Attack

behavior T

AttackBehaviorExt.RemoveAttackBehavior(this Attack) Method

Remove the first Behavior of Type T

public static void RemoveAttackBehavior<T>(this Attack attack)
    where T : AttackBehavior;

Type parameters

T

The Behavior you want to remove

Parameters

attack Il2CppAssets.Scripts.Simulation.Towers.Behaviors.Attack.Attack

AttackBehaviorExt.RemoveAttackBehaviors(this Attack) Method

Remove all Behaviors of type T

public static void RemoveAttackBehaviors<T>(this Attack attack)
    where T : AttackBehavior;

Type parameters

T

The Behavior you want to remove

Parameters

attack Il2CppAssets.Scripts.Simulation.Towers.Behaviors.Attack.Attack

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