Skip to Main Content
Table of Contents

BTD_Mod_Helper​.Extensions​.BloonModelExt


BloonsTD6 Mod Helper

BTD_Mod_Helper.Extensions

BloonModelExt Class

Extensions for BloonModels

public static class BloonModelExt

Inheritance System.Object  BloonModelExt

Methods

BloonModelExt.AddTag(this BloonModel, string) Method

Adds a tag to the BloonModel, if it doesn't already exist

public static void AddTag(this BloonModel bloonModel, string tag);

Parameters

bloonModel Il2CppAssets.Scripts.Models.Bloons.BloonModel

tag System.String

BloonModelExt.AddToChildren(this BloonModel, string, int) Method

Adds a child to be spawned from the Bloon

public static void AddToChildren(this BloonModel bloonModel, string id, int amount=1);

Parameters

bloonModel Il2CppAssets.Scripts.Models.Bloons.BloonModel

id System.String

amount System.Int32

BloonModelExt.AddToChildren(this BloonModel, int) Method

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;

Type parameters

T

Parameters

bloonModel Il2CppAssets.Scripts.Models.Bloons.BloonModel

amount System.Int32

BloonModelExt.ApplyDisplay(this BloonModel) Method

Applies a given ModDisplay to this TowerModel

public static void ApplyDisplay<T>(this BloonModel bloonModel)
    where T : BTD_Mod_Helper.Api.Display.ModDisplay;

Type parameters

T

The type of ModDisplay

Parameters

bloonModel Il2CppAssets.Scripts.Models.Bloons.BloonModel

BloonModelExt.CreateBloonEmissionModel(this BloonModel, int, int) Method

Create a BloonEmissionModel from this BloonModel

public static Il2CppReferenceArray<BloonEmissionModel> CreateBloonEmissionModel(this BloonModel bloonModel, int count, int spacing);

Parameters

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

Returns

Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppReferenceArray

BloonModelExt.FindChangedBloonId(this BloonModel, Action, string) Method

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);

Parameters

bloonModel Il2CppAssets.Scripts.Models.Bloons.BloonModel

change System.Action<Il2CppAssets.Scripts.Models.Bloons.BloonModel>

id System.String

Returns

System.Boolean

BloonModelExt.GetAllBloonToSim(this BloonModel) Method

Return all BloonToSimulations with this BloonModel

public static System.Collections.Generic.List<BloonToSimulation> GetAllBloonToSim(this BloonModel bloonModel);

Parameters

bloonModel Il2CppAssets.Scripts.Models.Bloons.BloonModel

Returns

System.Collections.Generic.List<Il2CppAssets.Scripts.Unity.Bridge.BloonToSimulation>

BloonModelExt.GetBaseID(this BloonModel) Method

Return the Base ID of this BloonModel

public static string GetBaseID(this BloonModel bloonModel);

Parameters

bloonModel Il2CppAssets.Scripts.Models.Bloons.BloonModel

Returns

System.String

BloonModelExt.GetBloonModel(this BloonGroupModel) Method

Gets the BloonModel for this group

public static BloonModel GetBloonModel(this BloonGroupModel bloonGroupModel);

Parameters

bloonGroupModel Il2CppAssets.Scripts.Models.Rounds.BloonGroupModel

Returns

Il2CppAssets.Scripts.Models.Bloons.BloonModel

BloonModelExt.GetBloonSims(this BloonModel) Method

Return all BloonToSimulations with this BloonModel

public static System.Collections.Generic.List<BloonToSimulation> GetBloonSims(this BloonModel bloonModel);

Parameters

bloonModel Il2CppAssets.Scripts.Models.Bloons.BloonModel

Returns

System.Collections.Generic.List<Il2CppAssets.Scripts.Unity.Bridge.BloonToSimulation>

BloonModelExt.GetDisplayGUID(this BloonModel) Method

Returns the Display GUID for this BloonModel.

public static string GetDisplayGUID(this BloonModel bloonModel);

Parameters

bloonModel Il2CppAssets.Scripts.Models.Bloons.BloonModel

Returns

System.String

BloonModelExt.GetIndex(this BloonModel) Method

Return the number position of this bloon from the list of all bloons (Game.instance.model.bloons)

public static int GetIndex(this BloonModel bloonModel);

Parameters

bloonModel Il2CppAssets.Scripts.Models.Bloons.BloonModel

Returns

System.Int32

BloonModelExt.GetModBloon(this BloonModel) Method

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);

Parameters

bloonModel Il2CppAssets.Scripts.Models.Bloons.BloonModel

Returns

ModBloon

BloonModelExt.GetSpawnChildrenModel(this BloonModel, bool) Method

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);

Parameters

bloonModel Il2CppAssets.Scripts.Models.Bloons.BloonModel

addIfNotExists System.Boolean

Returns

Il2CppAssets.Scripts.Models.Bloons.Behaviors.SpawnChildrenModel

BloonModelExt.GetTotalCash(this BloonModel, int) Method

(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);

Parameters

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

System.Int32

BloonModelExt.IsCamoBloon(this BloonModel) Method

Returns whether or not this BloonModel is a Camo bloon.

public static bool IsCamoBloon(this BloonModel bloonModel);

Parameters

bloonModel Il2CppAssets.Scripts.Models.Bloons.BloonModel

Returns

System.Boolean

BloonModelExt.IsFortifiedBloon(this BloonModel) Method

Returns whether or not this BloonModel is a Fortified bloon.

public static bool IsFortifiedBloon(this BloonModel bloonModel);

Parameters

bloonModel Il2CppAssets.Scripts.Models.Bloons.BloonModel

Returns

System.Boolean

BloonModelExt.IsMoabBloon(this BloonModel) Method

Returns whether or not this BloonModel is an MOAB-Class bloon.

public static bool IsMoabBloon(this BloonModel bloonModel);

Parameters

bloonModel Il2CppAssets.Scripts.Models.Bloons.BloonModel

Returns

System.Boolean

BloonModelExt.IsRegrowBloon(this BloonModel) Method

Returns whether or not this BloonModel is a Regrow bloon.

public static bool IsRegrowBloon(this BloonModel bloonModel);

Parameters

bloonModel Il2CppAssets.Scripts.Models.Bloons.BloonModel

Returns

System.Boolean

BloonModelExt.MakeChildrenCamo(this BloonModel) Method

Makes all children of this Bloon Camo, if they can have it

public static void MakeChildrenCamo(this BloonModel bloonModel);

Parameters

bloonModel Il2CppAssets.Scripts.Models.Bloons.BloonModel

BloonModelExt.MakeChildrenFortified(this BloonModel) Method

Makes all children of this Bloon Fortified, if they can have it

public static void MakeChildrenFortified(this BloonModel bloonModel);

Parameters

bloonModel Il2CppAssets.Scripts.Models.Bloons.BloonModel

BloonModelExt.MakeChildrenRegrow(this BloonModel) Method

Makes all children of this Bloon Regrow, if they can have it

public static void MakeChildrenRegrow(this BloonModel bloonModel);

Parameters

bloonModel Il2CppAssets.Scripts.Models.Bloons.BloonModel

BloonModelExt.RemoveAllChildren(this BloonModel) Method

Removes all spawned children from this BloonModel

public static void RemoveAllChildren(this BloonModel bloonModel);

Parameters

bloonModel Il2CppAssets.Scripts.Models.Bloons.BloonModel

BloonModelExt.RemoveFromChildren(this BloonModel, string, int) Method

Removes up to amount of the given Bloon from the spawned children

public static void RemoveFromChildren(this BloonModel bloonModel, string id, int amount=1);

Parameters

bloonModel Il2CppAssets.Scripts.Models.Bloons.BloonModel

id System.String

amount System.Int32

BloonModelExt.RemoveRegrow(this BloonModel) Method

Removes the Regrow behavior from this BloonModel.

public static void RemoveRegrow(this BloonModel bloonModel);

Parameters

bloonModel Il2CppAssets.Scripts.Models.Bloons.BloonModel

BloonModelExt.RemoveTag(this BloonModel, string) Method

Removes a tag from the BloonModel, if it exists

public static void RemoveTag(this BloonModel bloonModel, string tag);

Parameters

bloonModel Il2CppAssets.Scripts.Models.Bloons.BloonModel

tag System.String

BloonModelExt.ReplaceInChildren(this BloonModel, string, string) Method

Replaces all spawned child Bloons with the given id with the given ModBloon

public static void ReplaceInChildren(this BloonModel bloonModel, string oldId, string newId);

Parameters

bloonModel Il2CppAssets.Scripts.Models.Bloons.BloonModel

oldId System.String

newId System.String

BloonModelExt.ReplaceInChildren(this BloonModel, string) Method

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;

Type parameters

T

Parameters

bloonModel Il2CppAssets.Scripts.Models.Bloons.BloonModel

oldId System.String

BloonModelExt.ReplaceInChildren<TOld,TNew>(this BloonModel, string) Method

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;

Type parameters

TOld

TNew

Parameters

bloonModel Il2CppAssets.Scripts.Models.Bloons.BloonModel

id System.String

BloonModelExt.SetCamo(this BloonModel, bool) Method

Set whether or not this BloonModel is a Camo bloon.

public static void SetCamo(this BloonModel bloonModel, bool isCamo);

Parameters

bloonModel Il2CppAssets.Scripts.Models.Bloons.BloonModel

isCamo System.Boolean

BloonModelExt.SetDisplayGUID(this BloonModel, string) Method

Set the Display GUID for this BloonModel.

public static void SetDisplayGUID(this BloonModel bloonModel, string guid);

Parameters

bloonModel Il2CppAssets.Scripts.Models.Bloons.BloonModel

guid System.String

BloonModelExt.SetFortified(this BloonModel, bool) Method

Set whether or not this BloonModel is a Fortified bloon.

public static void SetFortified(this BloonModel bloonModel, bool isFortified);

Parameters

bloonModel Il2CppAssets.Scripts.Models.Bloons.BloonModel

isFortified System.Boolean

BloonModelExt.SetMoab(this BloonModel, bool) Method

Set whether or not this BloonModel is a Fortified bloon.

public static void SetMoab(this BloonModel bloonModel, bool isMoabBloon);

Parameters

bloonModel Il2CppAssets.Scripts.Models.Bloons.BloonModel

isMoabBloon System.Boolean

BloonModelExt.SetRegrow(this BloonModel, string, float) Method

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);

Parameters

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.

BloonModelExt.SetRegrowBool(this BloonModel, bool) Method

Set whether or not this BloonModel is a Regrow bloon.

private static void SetRegrowBool(this BloonModel bloonModel, bool isRegrow);

Parameters

bloonModel Il2CppAssets.Scripts.Models.Bloons.BloonModel

isRegrow System.Boolean

BloonModelExt.SpawnBloonModel(this BloonModel) Method

Spawn this BloonModel on the map right now

public static void SpawnBloonModel(this BloonModel bloonModel);

Parameters

bloonModel Il2CppAssets.Scripts.Models.Bloons.BloonModel

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