Skip to Main Content

BTD_Mod_Helper​.Extensions​.WeaponBehaviorExt


BloonsTD6 Mod Helper

BTD_Mod_Helper.Extensions

WeaponBehaviorExt Class

Behavior extensions for Weapons

public static class WeaponBehaviorExt

Inheritance System.Object  WeaponBehaviorExt

Methods

WeaponBehaviorExt.AddWeaponBehavior(this Weapon, T) Method

Add a Behavior to this

public static void AddWeaponBehavior<T>(this Weapon weapon, T behavior)
    where T : WeaponBehavior;

Type parameters

T

The Behavior you want to add

Parameters

weapon Il2CppAssets.Scripts.Simulation.Towers.Weapons.Weapon

behavior T

WeaponBehaviorExt.GetWeaponBehavior(this Weapon) Method

Return the first Behavior of type T

public static T GetWeaponBehavior<T>(this Weapon weapon)
    where T : WeaponBehavior;

Type parameters

T

The Behavior you want

Parameters

weapon Il2CppAssets.Scripts.Simulation.Towers.Weapons.Weapon

Returns

T

WeaponBehaviorExt.GetWeaponBehaviors(this Weapon) Method

Return all Behaviors of type T

public static System.Collections.Generic.List<T> GetWeaponBehaviors<T>(this Weapon weapon)
    where T : WeaponBehavior;

Type parameters

T

The Behavior you want

Parameters

weapon Il2CppAssets.Scripts.Simulation.Towers.Weapons.Weapon

Returns

System.Collections.Generic.List<T>

WeaponBehaviorExt.HasAttackBehavior(this Weapon, T) Method

Check if this has a specific Behavior

public static bool HasAttackBehavior<T>(this Weapon weapon, out T item)
    where T : WeaponBehavior;

Type parameters

T

The Behavior you're checking for

Parameters

weapon Il2CppAssets.Scripts.Simulation.Towers.Weapons.Weapon

item T

The returned item, if it exists

Returns

System.Boolean

WeaponBehaviorExt.HasWeaponBehavior(this Weapon) Method

Check if this has a specific Behavior

public static bool HasWeaponBehavior<T>(this Weapon weapon)
    where T : WeaponBehavior;

Type parameters

T

The Behavior you're checking for

Parameters

weapon Il2CppAssets.Scripts.Simulation.Towers.Weapons.Weapon

Returns

System.Boolean

WeaponBehaviorExt.RemoveWeaponBehavior(this Weapon, T) Method

Remove the first Behavior of type T

public static void RemoveWeaponBehavior<T>(this Weapon weapon, T behavior)
    where T : WeaponBehavior;

Type parameters

T

The Behavior you want to remove

Parameters

weapon Il2CppAssets.Scripts.Simulation.Towers.Weapons.Weapon

behavior T

WeaponBehaviorExt.RemoveWeaponBehavior(this Weapon) Method

Remove the first Behavior of Type T

public static void RemoveWeaponBehavior<T>(this Weapon weapon)
    where T : WeaponBehavior;

Type parameters

T

The Behavior you want to remove

Parameters

weapon Il2CppAssets.Scripts.Simulation.Towers.Weapons.Weapon

WeaponBehaviorExt.RemoveWeaponBehaviors(this Weapon) Method

Remove all Behaviors of type T

public static void RemoveWeaponBehaviors<T>(this Weapon weapon)
    where T : WeaponBehavior;

Type parameters

T

The Behavior you want to remove

Parameters

weapon Il2CppAssets.Scripts.Simulation.Towers.Weapons.Weapon

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