Ejemplo n.º 1
0
 internal static void Postfix(OverclockInput __instance, Vector3 cursorPosUnityWorld)
 {
     lastCursorPosUnity = cursorPosUnityWorld;
     if (__instance.targetImages != null && Main.CurrentTowerIDs.Contains(__instance.tower.Id))
     {
         foreach (var kvp in __instance.targetImages)
         {
             towers.Add(kvp.Key);
         }
     }
 }
Ejemplo n.º 2
0
            internal static void Postfix(OverclockInput __instance)
            {
                if (__instance.ability.CooldownRemaining != 0 && Main.CurrentTowerIDs.Contains(__instance.tower.Id))
                {
                    var tower = towers.OrderBy(tts => tts.position.ToSMathVector().Distance(lastCursorPosUnity.ToSMathVector())).First().tower;

                    var engi = __instance.tower.tower;
                    AddBoost(engi, tower);
                    if (InGame.instance.IsCoop && __instance.tower.owner != Game.instance.nkGI.PeerID)
                    {
                        Game.instance.nkGI.SendMessage("Boost: " + __instance.tower.Id + " " + tower.Id, null, "AbilityChoice");
                    }

                    if (engi.towerModel.tier == 5)
                    {
                        ultraBoostTimer = 0;
                    }
                }

                towers = new HashSet <TowerToSimulation>();
            }