Table of Contents
Extensions for BloonModels
public static class BloonModelExt
Inheritance System.Object BloonModelExt
Adds a tag to the BloonModel, if it doesn't already exist
public static void AddTag(this BloonModel bloonModel, string tag);
bloonModel
Il2CppAssets.Scripts.Models.Bloons.BloonModel
tag
System.String
Adds a child to be spawned from the Bloon
public static void AddToChildren(this BloonModel bloonModel, string id, int amount=1);
bloonModel
Il2CppAssets.Scripts.Models.Bloons.BloonModel
amount
System.Int32
Adds a child to be spawned from the Bloon
public static void AddToChildren<T>(this BloonModel bloonModel, int amount=1)
where T : BTD_Mod_Helper.Api.Bloons.ModBloon;
T
bloonModel
Il2CppAssets.Scripts.Models.Bloons.BloonModel
amount
System.Int32
Applies a given ModDisplay to this TowerModel
public static void ApplyDisplay<T>(this BloonModel bloonModel)
where T : BTD_Mod_Helper.Api.Display.ModDisplay;
T
The type of ModDisplay
bloonModel
Il2CppAssets.Scripts.Models.Bloons.BloonModel
Create a BloonEmissionModel from this BloonModel
public static Il2CppReferenceArray<BloonEmissionModel> CreateBloonEmissionModel(this BloonModel bloonModel, int count, int spacing);
bloonModel
Il2CppAssets.Scripts.Models.Bloons.BloonModel
count
System.Int32
Number of bloons in this emission model
spacing
System.Int32
Space between each bloon in this emission model
Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppReferenceArray
Finds the id for a bloon that has the properties of this bloonModel, or null if there isn't one
public static bool FindChangedBloonId(this BloonModel bloonModel, System.Action<BloonModel> change, out string id);
bloonModel
Il2CppAssets.Scripts.Models.Bloons.BloonModel
change
System.Action<Il2CppAssets.Scripts.Models.Bloons.BloonModel>
Return all BloonToSimulations with this BloonModel
public static System.Collections.Generic.List<BloonToSimulation> GetAllBloonToSim(this BloonModel bloonModel);
bloonModel
Il2CppAssets.Scripts.Models.Bloons.BloonModel
System.Collections.Generic.List<Il2CppAssets.Scripts.Unity.Bridge.BloonToSimulation>
Return the Base ID of this BloonModel
public static string GetBaseID(this BloonModel bloonModel);
bloonModel
Il2CppAssets.Scripts.Models.Bloons.BloonModel
Gets the BloonModel for this group
public static BloonModel GetBloonModel(this BloonGroupModel bloonGroupModel);
bloonGroupModel
Il2CppAssets.Scripts.Models.Rounds.BloonGroupModel
Il2CppAssets.Scripts.Models.Bloons.BloonModel
Return all BloonToSimulations with this BloonModel
public static System.Collections.Generic.List<BloonToSimulation> GetBloonSims(this BloonModel bloonModel);
bloonModel
Il2CppAssets.Scripts.Models.Bloons.BloonModel
System.Collections.Generic.List<Il2CppAssets.Scripts.Unity.Bridge.BloonToSimulation>
Returns the Display GUID for this BloonModel.
public static string GetDisplayGUID(this BloonModel bloonModel);
bloonModel
Il2CppAssets.Scripts.Models.Bloons.BloonModel
Return the number position of this bloon from the list of all bloons (Game.instance.model.bloons)
public static int GetIndex(this BloonModel bloonModel);
bloonModel
Il2CppAssets.Scripts.Models.Bloons.BloonModel
Gets the ModBloon associated with this BloonModel
If there is no associated ModBloon, returns null
public static BTD_Mod_Helper.Api.Bloons.ModBloon GetModBloon(this BloonModel bloonModel);
bloonModel
Il2CppAssets.Scripts.Models.Bloons.BloonModel
Gets the SpawnChildrenModel for the bloon, and optionally creates one if it doesn't exist
public static SpawnChildrenModel GetSpawnChildrenModel(this BloonModel bloonModel, bool addIfNotExists=false);
bloonModel
Il2CppAssets.Scripts.Models.Bloons.BloonModel
addIfNotExists
System.Boolean
Il2CppAssets.Scripts.Models.Bloons.Behaviors.SpawnChildrenModel
(Cross-Game compatable) Return how much cash this bloon would give if popped by layersPopped number
of layers
public static int GetTotalCash(this BloonModel bloonModel, int layersPopped=-1);
bloonModel
Il2CppAssets.Scripts.Models.Bloons.BloonModel
layersPopped
System.Int32
How many layers of bloons to pop, ignoring layer health. If less than 0, calculates for the
entire bloon
Returns whether or not this BloonModel is a Camo bloon.
public static bool IsCamoBloon(this BloonModel bloonModel);
bloonModel
Il2CppAssets.Scripts.Models.Bloons.BloonModel
Returns whether or not this BloonModel is a Fortified bloon.
public static bool IsFortifiedBloon(this BloonModel bloonModel);
bloonModel
Il2CppAssets.Scripts.Models.Bloons.BloonModel
Returns whether or not this BloonModel is an MOAB-Class bloon.
public static bool IsMoabBloon(this BloonModel bloonModel);
bloonModel
Il2CppAssets.Scripts.Models.Bloons.BloonModel
Returns whether or not this BloonModel is a Regrow bloon.
public static bool IsRegrowBloon(this BloonModel bloonModel);
bloonModel
Il2CppAssets.Scripts.Models.Bloons.BloonModel
Makes all children of this Bloon Camo, if they can have it
public static void MakeChildrenCamo(this BloonModel bloonModel);
bloonModel
Il2CppAssets.Scripts.Models.Bloons.BloonModel
Makes all children of this Bloon Fortified, if they can have it
public static void MakeChildrenFortified(this BloonModel bloonModel);
bloonModel
Il2CppAssets.Scripts.Models.Bloons.BloonModel
Makes all children of this Bloon Regrow, if they can have it
public static void MakeChildrenRegrow(this BloonModel bloonModel);
bloonModel
Il2CppAssets.Scripts.Models.Bloons.BloonModel
Removes all spawned children from this BloonModel
public static void RemoveAllChildren(this BloonModel bloonModel);
bloonModel
Il2CppAssets.Scripts.Models.Bloons.BloonModel
Removes up to amount of the given Bloon from the spawned children
public static void RemoveFromChildren(this BloonModel bloonModel, string id, int amount=1);
bloonModel
Il2CppAssets.Scripts.Models.Bloons.BloonModel
amount
System.Int32
Removes the Regrow behavior from this BloonModel.
public static void RemoveRegrow(this BloonModel bloonModel);
bloonModel
Il2CppAssets.Scripts.Models.Bloons.BloonModel
Removes a tag from the BloonModel, if it exists
public static void RemoveTag(this BloonModel bloonModel, string tag);
bloonModel
Il2CppAssets.Scripts.Models.Bloons.BloonModel
tag
System.String
Replaces all spawned child Bloons with the given id with the given ModBloon
public static void ReplaceInChildren(this BloonModel bloonModel, string oldId, string newId);
bloonModel
Il2CppAssets.Scripts.Models.Bloons.BloonModel
oldId
System.String
newId
System.String
Replaces all spawned child Bloons that have id oldId with the given ModBloon
public static void ReplaceInChildren<T>(this BloonModel bloonModel, string oldId)
where T : BTD_Mod_Helper.Api.Bloons.ModBloon;
T
bloonModel
Il2CppAssets.Scripts.Models.Bloons.BloonModel
oldId
System.String
Replaces all spawned child Bloons of the first ModBloon type with the second ModBloon type
public static void ReplaceInChildren<TOld,TNew>(this BloonModel bloonModel, string id)
where TOld : BTD_Mod_Helper.Api.Bloons.ModBloon
where TNew : BTD_Mod_Helper.Api.Bloons.ModBloon;
TOld
TNew
bloonModel
Il2CppAssets.Scripts.Models.Bloons.BloonModel
Set whether or not this BloonModel is a Camo bloon.
public static void SetCamo(this BloonModel bloonModel, bool isCamo);
bloonModel
Il2CppAssets.Scripts.Models.Bloons.BloonModel
isCamo
System.Boolean
Set the Display GUID for this BloonModel.
public static void SetDisplayGUID(this BloonModel bloonModel, string guid);
bloonModel
Il2CppAssets.Scripts.Models.Bloons.BloonModel
guid
System.String
Set whether or not this BloonModel is a Fortified bloon.
public static void SetFortified(this BloonModel bloonModel, bool isFortified);
bloonModel
Il2CppAssets.Scripts.Models.Bloons.BloonModel
isFortified
System.Boolean
Set whether or not this BloonModel is a Fortified bloon.
public static void SetMoab(this BloonModel bloonModel, bool isMoabBloon);
bloonModel
Il2CppAssets.Scripts.Models.Bloons.BloonModel
isMoabBloon
System.Boolean
Adds the Regrow behavior to this BloonModel and sets what
Bloon it Regrows into.
public static void SetRegrow(this BloonModel bloonModel, string regrowsTo, float regrowRate=3f);
bloonModel
Il2CppAssets.Scripts.Models.Bloons.BloonModel
regrowsTo
System.String
The ID of the BloonModel that this should regrow into.
regrowRate
System.Single
The rate at which this regrows.
Set whether or not this BloonModel is a Regrow bloon.
private static void SetRegrowBool(this BloonModel bloonModel, bool isRegrow);
bloonModel
Il2CppAssets.Scripts.Models.Bloons.BloonModel
isRegrow
System.Boolean
Spawn this BloonModel on the map right now
public static void SpawnBloonModel(this BloonModel bloonModel);