예제 #1
0
        /// <summary>
        /// (Cross-Game compatible) Get's all AbilityToSimulations currently in the game
        /// </summary>
        /// <param name="inGame"></param>
        /// <returns></returns>
        public static List <AbilityToSimulation> GetAbilities(this InGame inGame)
        {
#if BloonsTD6
            return(inGame.GetUnityToSimulation()?.GetAllAbilities(false)?.ToList());
#elif BloonsAT
            return(inGame.GetUnityToSimulation()?.GetAllAbilities()?.ToList());
#endif
        }
예제 #2
0
        /// <summary>
        /// (Cross-Game compatible) Get all TowerToSimulations
        /// </summary>
        /// <param name="inGame"></param>
        /// /// <param name="name">Optionally only get Towers whose TowerModel name is this paramater</param>
        /// <returns></returns>
        public static List <TowerToSimulation> GetAllTowerToSim(this InGame inGame, string name = null)
        {
            var towerToSims = inGame.GetUnityToSimulation()?.GetAllTowers()?.ToList();

            if (!string.IsNullOrEmpty(name))
            {
                towerToSims = towerToSims?.FindAll(tower => tower.Def.name == name);
            }

            return(towerToSims);
        }
예제 #3
0
 /// <summary>
 /// Spawn bloons in game
 /// </summary>
 /// <param name="inGame"></param>
 /// <param name="bloonEmissionModels"></param>
 public static void SpawnBloons(this InGame inGame, Il2CppReferenceArray <BloonEmissionModel> bloonEmissionModels)
 {
     inGame.GetUnityToSimulation().SpawnBloons(bloonEmissionModels, inGame.GetUnityToSimulation().GetCurrentRound(), 0);
 }
예제 #4
0
 /// <summary>
 /// Spawn bloons in game
 /// </summary>
 /// <param name="inGame"></param>
 /// <param name="bloonEmissionModels"></param>
 public static void SpawnBloons(this InGame inGame, System.Collections.Generic.List <BloonEmissionModel> bloonEmissionModels)
 {
     inGame.GetUnityToSimulation().SpawnBloons(bloonEmissionModels.ToIl2CppReferenceArray(), inGame.GetUnityToSimulation().GetCurrentRound(), 0);
 }
예제 #5
0
 /// <summary>
 /// (Cross-Game compatible) Get the current Simulation for this InGame session
 /// </summary>
 public static Simulation GetSimulation(this InGame inGame)
 {
     return(inGame.GetUnityToSimulation()?.simulation);
 }
예제 #6
0
 /// <summary>
 /// (Cross-Game compatible) Get's all existing BloonToSimulations
 /// </summary>
 /// <param name="inGame"></param>
 /// <returns></returns>
 public static List <BloonToSimulation> GetAllBloonToSim(this InGame inGame)
 {
     //return SessionData.Instance.bloonTracker.currentBloonToSims.Values.ToList();
     return(inGame.GetUnityToSimulation().GetAllBloons().ToList());
 }
예제 #7
0
 public static List <TowerToSimulation> GetTowerSims(this InGame inGame)
 {
     return(inGame.GetUnityToSimulation()?.GetAllTowers()?.ToList());
 }