Skip to Main Content
Table of Contents

BTD_Mod_Helper​.Extensions​.InGameExt


BloonsTD6 Mod Helper

BTD_Mod_Helper.Extensions

InGameExt Class

Extensions for the InGame class

public static class InGameExt

Inheritance System.Object  InGameExt

Methods

InGameExt.AddCash(this InGame, double) Method

Add cash to the Player's wallet

public static void AddCash(this InGame inGame, double amount);

Parameters

inGame Il2CppAssets.Scripts.Unity.UI_New.InGame.InGame

InGame instance

amount System.Double

Amount of cash to add to player wallet

InGameExt.AddHealth(this InGame, double) Method

Add health to the players current health

public static void AddHealth(this InGame inGame, double amount);

Parameters

inGame Il2CppAssets.Scripts.Unity.UI_New.InGame.InGame

InGame instance

amount System.Double

Amount of health to add

InGameExt.AddMaxHealth(this InGame, double) Method

Add to the player's max health

public static void AddMaxHealth(this InGame inGame, double amount);

Parameters

inGame Il2CppAssets.Scripts.Unity.UI_New.InGame.InGame

InGame instance

amount System.Double

Amount to add to the player's max health

InGameExt.GetAbilities(this InGame) Method

Get's all AbilityToSimulations currently in the game

public static System.Collections.Generic.List<AbilityToSimulation> GetAbilities(this InGame inGame);

Parameters

inGame Il2CppAssets.Scripts.Unity.UI_New.InGame.InGame

Returns

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

InGameExt.GetAllBloonToSim(this InGame) Method

Get's all existing BloonToSimulations

public static System.Collections.Generic.List<BloonToSimulation> GetAllBloonToSim(this InGame inGame);

Parameters

inGame Il2CppAssets.Scripts.Unity.UI_New.InGame.InGame

Returns

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

InGameExt.GetAllObjectsOfType(this InGame) Method

Gets all objects of type T. Does this by returning all objects created by the Factory of type T

public static System.Collections.Generic.List<T> GetAllObjectsOfType<T>(this InGame inGame)
    where T : RootObject, new();

Type parameters

T

The type of items you want

Parameters

inGame Il2CppAssets.Scripts.Unity.UI_New.InGame.InGame

Returns

System.Collections.Generic.List<T>

InGameExt.GetAllTowerToSim(this InGame, string) Method

Get all TowerToSimulations

public static System.Collections.Generic.List<TowerToSimulation> GetAllTowerToSim(this InGame inGame, string name=null);

Parameters

inGame Il2CppAssets.Scripts.Unity.UI_New.InGame.InGame

name System.String

Optionally only get Towers whose TowerModel name is this parameter

Returns

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

InGameExt.GetBloons(this InGame) Method

Get's all Bloons on the map

public static System.Collections.Generic.List<Bloon> GetBloons(this InGame inGame);

Parameters

inGame Il2CppAssets.Scripts.Unity.UI_New.InGame.InGame

Returns

System.Collections.Generic.List<Il2CppAssets.Scripts.Simulation.Bloons.Bloon>

InGameExt.GetCash(this InGame) Method

Get the Player's current cash

public static double GetCash(this InGame inGame);

Parameters

inGame Il2CppAssets.Scripts.Unity.UI_New.InGame.InGame

Returns

System.Double

InGameExt.GetCashManager(this InGame, int) Method

Get the Cash Manager for the current game

public static CashManager GetCashManager(this InGame inGame, int index=0);

Parameters

inGame Il2CppAssets.Scripts.Unity.UI_New.InGame.InGame

InGame instance

index System.Int32

Index of the cash manager. Default is 0

Returns

Il2CppAssets.Scripts.Simulation.CashManager

InGameExt.GetFactory(this InGame) Method

Get the Factory for a specific Type. Ex: Getting the Factory that makes Towers

public static Factory<T> GetFactory<T>(this InGame inGame)
    where T : RootObject, new();

Type parameters

T

Parameters

inGame Il2CppAssets.Scripts.Unity.UI_New.InGame.InGame

Returns

Il2CppAssets.Scripts.Simulation.Factory.Factory

InGameExt.GetGameModel(this InGame) Method

The Game.model that is being used for this InGame.instance

public static GameModel GetGameModel(this InGame inGame);

Parameters

inGame Il2CppAssets.Scripts.Unity.UI_New.InGame.InGame

Returns

Il2CppAssets.Scripts.Models.GameModel

InGameExt.GetHealth(this InGame) Method

Get the Player's current health

public static double GetHealth(this InGame inGame);

Parameters

inGame Il2CppAssets.Scripts.Unity.UI_New.InGame.InGame

Returns

System.Double

InGameExt.GetInGameUI(this InGame) Method

Get the game object that owns all InGame UI elements

public static GameObject GetInGameUI(this InGame inGame);

Parameters

inGame Il2CppAssets.Scripts.Unity.UI_New.InGame.InGame

Returns

UnityEngine.GameObject

InGameExt.GetMainFactory(this InGame) Method

Get the main Factory that creates and manages all other Factories

public static FactoryFactory GetMainFactory(this InGame inGame);

Parameters

inGame Il2CppAssets.Scripts.Unity.UI_New.InGame.InGame

Returns

Il2CppAssets.Scripts.Simulation.Factory.FactoryFactory

InGameExt.GetMap(this InGame) Method

Get the current Map

public static Map GetMap(this InGame inGame);

Parameters

inGame Il2CppAssets.Scripts.Unity.UI_New.InGame.InGame

Returns

Il2CppAssets.Scripts.Simulation.Track.Map

InGameExt.GetMaxHealth(this InGame) Method

Get the player's max health

public static double GetMaxHealth(this InGame inGame);

Parameters

inGame Il2CppAssets.Scripts.Unity.UI_New.InGame.InGame

Returns

System.Double

InGameExt.GetPoppedBloons(this InGame) Method

Get collection of popped bloons in this game. Right now only works for current games. Does not store results from
loaded games

public static System.Collections.Generic.Dictionary<string,int> GetPoppedBloons(this InGame inGame);

Parameters

inGame Il2CppAssets.Scripts.Unity.UI_New.InGame.InGame

Returns

System.Collections.Generic.Dictionary<System.String,System.Int32>

InGameExt.GetProjectiles(this InGame) Method

Get's all existing Projectiles on the map

public static System.Collections.Generic.List<Projectile> GetProjectiles(this InGame inGame);

Parameters

inGame Il2CppAssets.Scripts.Unity.UI_New.InGame.InGame

Returns

System.Collections.Generic.List<Il2CppAssets.Scripts.Simulation.Towers.Projectiles.Projectile>

InGameExt.GetSimulation(this InGame) Method

Get the current Simulation for this InGame session

public static Simulation GetSimulation(this InGame inGame);

Parameters

inGame Il2CppAssets.Scripts.Unity.UI_New.InGame.InGame

Returns

Il2CppAssets.Scripts.Simulation.Simulation

InGameExt.GetTowerInventory(this InGame) Method

Get the current instance of TowerInventory being used in this game session

public static TowerInventory GetTowerInventory(this InGame inGame);

Parameters

inGame Il2CppAssets.Scripts.Unity.UI_New.InGame.InGame

Returns

Il2CppAssets.Scripts.Simulation.Input.TowerInventory

InGameExt.GetTowerManager(this InGame) Method

Get the current TowerManager for this game session

public static TowerManager GetTowerManager(this InGame inGame);

Parameters

inGame Il2CppAssets.Scripts.Unity.UI_New.InGame.InGame

Returns

Il2CppAssets.Scripts.Simulation.Towers.TowerManager

InGameExt.GetTowers(this InGame, string) Method

Get every Tower that has been created through the Tower Factory

public static System.Collections.Generic.List<Tower> GetTowers(this InGame inGame, string name=null);

Parameters

inGame Il2CppAssets.Scripts.Unity.UI_New.InGame.InGame

name System.String

Optionally only get Towers whose TowerModel name is this parameter

Returns

System.Collections.Generic.List<Il2CppAssets.Scripts.Simulation.Towers.Tower>

InGameExt.GetUnityToSimulation(this InGame) Method

Get's the UnityToSimulation for this game

public static UnityToSimulation GetUnityToSimulation(this InGame inGame);

Parameters

inGame Il2CppAssets.Scripts.Unity.UI_New.InGame.InGame

Returns

Il2CppAssets.Scripts.Unity.Bridge.UnityToSimulation

InGameExt.IsCoOpReady(this InGame) Method

Returns true if the initial co-op handshake has finished and user has co-op game details.

public static bool IsCoOpReady(this InGame inGame);

Parameters

inGame Il2CppAssets.Scripts.Unity.UI_New.InGame.InGame

The game.

Returns

System.Boolean

InGameExt.IsInGame(this InGame) Method

Returns whether or not the player is currently in a game.

public static bool IsInGame(this InGame inGame);

Parameters

inGame Il2CppAssets.Scripts.Unity.UI_New.InGame.InGame

Returns

System.Boolean

InGameExt.SellTower(this InGame, Tower) Method

Sells a tower

public static void SellTower(this InGame inGame, Tower tower);

Parameters

inGame Il2CppAssets.Scripts.Unity.UI_New.InGame.InGame

tower Il2CppAssets.Scripts.Simulation.Towers.Tower

InGameExt.SellTowers(this InGame, List) Method

Sells multiple towers

public static void SellTowers(this InGame inGame, System.Collections.Generic.List<Tower> towers);

Parameters

inGame Il2CppAssets.Scripts.Unity.UI_New.InGame.InGame

towers System.Collections.Generic.List<Il2CppAssets.Scripts.Simulation.Towers.Tower>

InGameExt.SetCash(this InGame, double) Method

Set the Player's cash to a specific amount

public static void SetCash(this InGame inGame, double amount);

Parameters

inGame Il2CppAssets.Scripts.Unity.UI_New.InGame.InGame

InGame instance

amount System.Double

Value to set cash to

InGameExt.SetHealth(this InGame, double) Method

Set player's health to specific amount

public static void SetHealth(this InGame inGame, double amount);

Parameters

inGame Il2CppAssets.Scripts.Unity.UI_New.InGame.InGame

InGame instance

amount System.Double

Value to set health to

InGameExt.SetMaxHealth(this InGame, double) Method

Set the player's maximum health to a new value

public static void SetMaxHealth(this InGame inGame, double amount);

Parameters

inGame Il2CppAssets.Scripts.Unity.UI_New.InGame.InGame

InGame instance

amount System.Double

Value to set max health to

InGameExt.SetRound(this InGame, int) Method

Set the current round

public static void SetRound(this InGame inGame, int round);

Parameters

inGame Il2CppAssets.Scripts.Unity.UI_New.InGame.InGame

round System.Int32

InGameExt.SetRoundSet(this InGame, RoundSetModel) Method

Custom API method that changes the game's round set to a custom RoundSetModel.

public static void SetRoundSet(this InGame inGame, RoundSetModel roundSet);

Parameters

inGame Il2CppAssets.Scripts.Unity.UI_New.InGame.InGame

roundSet Il2CppAssets.Scripts.Models.Rounds.RoundSetModel

New Round Set Model to use

InGameExt.SpawnBloons(this InGame, Il2CppReferenceArray) Method

Spawn bloons in game

public static void SpawnBloons(this InGame inGame, Il2CppReferenceArray<BloonEmissionModel> bloonEmissionModels);

Parameters

inGame Il2CppAssets.Scripts.Unity.UI_New.InGame.InGame

bloonEmissionModels Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppReferenceArray

InGameExt.SpawnBloons(this InGame, int) Method

Spawn bloons in game

public static void SpawnBloons(this InGame inGame, int round);

Parameters

inGame Il2CppAssets.Scripts.Unity.UI_New.InGame.InGame

round System.Int32

InGameExt.SpawnBloons(this InGame, List) Method

Spawn bloons in game

public static void SpawnBloons(this InGame inGame, List<BloonEmissionModel> bloonEmissionModels);

Parameters

inGame Il2CppAssets.Scripts.Unity.UI_New.InGame.InGame

bloonEmissionModels Il2CppSystem.Collections.Generic.List

InGameExt.SpawnBloons(this InGame, string, int, float) Method

Spawn bloons in game

public static void SpawnBloons(this InGame inGame, string bloonName, int number, float spacing);

Parameters

inGame Il2CppAssets.Scripts.Unity.UI_New.InGame.InGame

bloonName System.String

number System.Int32

spacing System.Single

InGameExt.SpawnBloons(this InGame, List) Method

Spawn bloons in game

public static void SpawnBloons(this InGame inGame, System.Collections.Generic.List<BloonEmissionModel> bloonEmissionModels);

Parameters

inGame Il2CppAssets.Scripts.Unity.UI_New.InGame.InGame

bloonEmissionModels System.Collections.Generic.List<Il2CppAssets.Scripts.Models.Rounds.BloonEmissionModel>

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