Table of Contents
Behavior extensions for Weapons
public static class WeaponBehaviorExt
Inheritance System.Object WeaponBehaviorExt
Add a Behavior to this
public static void AddWeaponBehavior<T>(this Weapon weapon, T behavior)
where T : WeaponBehavior;
T
The Behavior you want to add
weapon
Il2CppAssets.Scripts.Simulation.Towers.Weapons.Weapon
behavior
T
Return the first Behavior of type T
public static T GetWeaponBehavior<T>(this Weapon weapon)
where T : WeaponBehavior;
T
The Behavior you want
weapon
Il2CppAssets.Scripts.Simulation.Towers.Weapons.Weapon
Return all Behaviors of type T
public static System.Collections.Generic.List<T> GetWeaponBehaviors<T>(this Weapon weapon)
where T : WeaponBehavior;
T
The Behavior you want
weapon
Il2CppAssets.Scripts.Simulation.Towers.Weapons.Weapon
System.Collections.Generic.List<T>
Check if this has a specific Behavior
public static bool HasAttackBehavior<T>(this Weapon weapon, out T item)
where T : WeaponBehavior;
T
The Behavior you're checking for
weapon
Il2CppAssets.Scripts.Simulation.Towers.Weapons.Weapon
item
T
The returned item, if it exists
Check if this has a specific Behavior
public static bool HasWeaponBehavior<T>(this Weapon weapon)
where T : WeaponBehavior;
T
The Behavior you're checking for
weapon
Il2CppAssets.Scripts.Simulation.Towers.Weapons.Weapon
Remove the first Behavior of type T
public static void RemoveWeaponBehavior<T>(this Weapon weapon, T behavior)
where T : WeaponBehavior;
T
The Behavior you want to remove
weapon
Il2CppAssets.Scripts.Simulation.Towers.Weapons.Weapon
behavior
T
Remove the first Behavior of Type T
public static void RemoveWeaponBehavior<T>(this Weapon weapon)
where T : WeaponBehavior;
T
The Behavior you want to remove
weapon
Il2CppAssets.Scripts.Simulation.Towers.Weapons.Weapon
Remove all Behaviors of type T
public static void RemoveWeaponBehaviors<T>(this Weapon weapon)
where T : WeaponBehavior;
T
The Behavior you want to remove
weapon
Il2CppAssets.Scripts.Simulation.Towers.Weapons.Weapon