-
Notifications
You must be signed in to change notification settings - Fork 121
Common Extension Methods
The Mod Helper contains hundreds of Extension Methods to various BTD classes to help make modding easier and faster. Here are the ones that are most important for you to know about.
GetBehavior<T>()
is present on nearly all Models and Behaviors, and its use is to get the first behavior of the specified type T
within the object you're calling it from.
GetBehaviors<T>()
is the same, but it returns all the behaviors of that type and not just the first one.
AddBehavior()
and RemoveBehavior()
perform pretty obvious but useful functions.
ApplyDisplay<T>()
is present on TowerModel
s, ProjectileModel
s and DisplayModel
s and can be used to directly apply your Custom Display with type T
to the given model.
AS OF 4/11/2023 NEW WIKI EDITS ARE BEING MAINTAINED AT https://gurrenm3.github.io/BTD-Mod-Helper/wiki
Join our Discord server: https://discord.gg/PBwGjDQ4vX