Beispiel #1
0
        public FighterGeometry()
        {
            var nose            = new Nose(0.5f, 0.6f, 26, 0.4f);
            var cockpitFuselage = new CockpitFuselage(nose, 1.2f, 1.2f, 3f);
            var mainFuselage    = new MainFuselage(cockpitFuselage);
            var intake          = new EngineIntake(cockpitFuselage);
            var underside       = new Underside(intake);
            var canopy          = new Canopy(0.65f, 0.5f, 3f, 16);
            var wing            = new Wing(4.5f, 4.5f);
            var rear            = new Rear(mainFuselage, underside);
            var tailFin         = new TailFin();
            var stabilizer      = new Stabilizer();
            var exhaust         = new Exhaust(rear, 0.6f);
            var bottomFin       = new BottomFin();

            var path      = exhaust.FlangeEndXSection;
            var graySlide = new Vec3(1f).Interpolate(new Vec3(0f), path.Vertices.Length);

            path.Vertices.Color(graySlide);
            Paths = EnumerableExt.Enumerate(path);

            Fighter = Composite.Create(Stacking.StackBackward(cockpitFuselage.Fuselage, mainFuselage.Fuselage)
                                       .Concat(EnumerableExt.Enumerate(intake.Intake, intake.Belly, underside.Geometry, canopy.Geometry,
                                                                       wing.Geometry, wing.Geometry.ReflectX(), rear.Geometry, exhaust.Geometry,
                                                                       exhaust.StabilizerFlange, exhaust.StabilizerFlange.ReflectX(),
                                                                       tailFin.Geometry, stabilizer.Geometry, stabilizer.Geometry.ReflectX(),
                                                                       bottomFin.Geometry, bottomFin.Geometry.ReflectX())))
                      .Smoothen(0.85f)
                      .Center();
        }
Beispiel #2
0
        public static void Execute()
        {
            if (HasSpell("summonersmite"))
            {
                Smite.Execute();
            }

            if (HasSpell("summonerheal"))
            {
                Heal.Execute();
            }

            if (HasSpell("summonerbarrier"))
            {
                Barrier.Execute();
            }

            if (HasSpell("summonerexhaust"))
            {
                Exhaust.Execute();
            }

            if (HasSpell("summonerghost"))
            {
                Ghost.Execute();
            }
        }
Beispiel #3
0
            public static void Combo()
            {
                if (QSS.IsReady() && (Player.HasBuffOfType(BuffType.Charm) || Player.HasBuffOfType(BuffType.Blind) || Player.HasBuffOfType(BuffType.Fear) || Player.HasBuffOfType(BuffType.Polymorph) || Player.HasBuffOfType(BuffType.Silence) || Player.HasBuffOfType(BuffType.Sleep) || Player.HasBuffOfType(BuffType.Snare) || Player.HasBuffOfType(BuffType.Stun) || Player.HasBuffOfType(BuffType.Suppression) || Player.HasBuffOfType(BuffType.Taunt)))
                {
                    QSS.Cast();
                }

                if (Q.IsReady() && Target.IsValidTarget(Q.Range - 80) && !Player.IsDashing())
                {
                    Q.Cast();
                }

                else if (W.IsReady() && Q.IsReady() && Target.IsValidTarget(625) && Player.Mana >= (Player.Spellbook.GetSpell(SpellSlot.W).SData.ManaCostArray[W.Level - 1] + Player.Spellbook.GetSpell(SpellSlot.Q).SData.ManaCostArray[Q.Level - 1]))
                {
                    WQ(); Combing = true;
                }

                if (Exhaust != null && Menu["UseExhaust?"].Cast <CheckBox>().CurrentValue&& TargetSelector.GetPriority(Target) > 3 && Target.IsValidTarget(Exhaust.Range) && Exhaust.IsReady())
                {
                    Exhaust.Cast(Target);
                }

                if (Target.IsValidTarget(Bilgewater.Range) && Bilgewater.IsReady())
                {
                    Bilgewater.Cast(Target);
                }

                if (Target.IsValidTarget(Randuin.Range) && Randuin.IsReady())
                {
                    Randuin.Cast();
                }

                return;
            }
Beispiel #4
0
        public static void Init()
        {
            if (HasSpell("summonersmite"))
            {
                Smite.Initialize();
            }

            if (HasSpell("summonerheal"))
            {
                Heal.Initialize();
            }

            if (HasSpell("summonerbarrier"))
            {
                Barrier.Initialize();
            }

            if (HasSpell("summonerexhaust"))
            {
                Exhaust.Initialize();
            }

            if (HasSpell("summonerghost"))
            {
                Ghost.Initialize();
            }
        }
Beispiel #5
0
            //---------------------------------------------Combo()------------------------------------------------

            public static void Combo()
            {
                if (Menu["UseQCombo"].Cast <CheckBox>().CurrentValue&& QRange && QIsReady)
                {
                    Q.HitChanceCast(Target, Menu["QHitChanceCombo"].Cast <Slider>().CurrentValue);
                }

                if (Menu["UseWCombo"].Cast <CheckBox>().CurrentValue&& WRange && WIsReady && !Menu["JustWOnImmobile"].Cast <CheckBox>().CurrentValue)
                {
                    var WPos = Prediction.Position.PredictUnitPosition(Target, 500).To3D();
                    W.Cast(WPos);
                }

                if (R.IsReady() && Menu["UseRCombo"].Cast <CheckBox>().CurrentValue&& Player.CountEnemiesInRange(600) >= Menu["Min Enemies R"].Cast <Slider>().CurrentValue)
                {
                    if (Glory.IsReady() && CountAlliesInRange(650) > 0)
                    {
                        Glory.Cast();
                    }
                    if (Talisma.IsReady() && CountAlliesInRange(650) > 0)
                    {
                        Talisma.Cast();
                    }

                    R.Cast();
                }

                if (Exhaust != null && Menu["UseExhaust?"].Cast <CheckBox>().CurrentValue&& TargetSelector.GetPriority(Target) > 3 && Target.IsValidTarget(Exhaust.Range))
                {
                    Exhaust.Cast(Target);
                }

                return;
            }
Beispiel #6
0
        private static void OnUpdate(EventArgs args)
        {
            QHitChance = QMenu["mediumpred"].Cast <CheckBox>().CurrentValue ? HitChance.Medium : HitChance.High;
            Killsteal();
            SkinChange();
            Ascension();
            RanduinU();
            ZhonyaU();
            if (MiscMenu["lvlup"].Cast <CheckBox>().CurrentValue)
            {
                LevelUpSpells();
            }
            AutoCast(immobile: AutoCastMenu["qi"].Cast <CheckBox>().CurrentValue,
                     dashing: AutoCastMenu["qd"].Cast <CheckBox>().CurrentValue);
            {
                if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
                {
                    Combo(ComboMenu["usecomboq"].Cast <CheckBox>().CurrentValue);
                }
                UseW(ComboMenu["usecombow"].Cast <CheckBox>().CurrentValue);
            }
            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) ||
                Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear))
            {
                LaneClearA.LaneClear();
            }
            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LastHit))
            {
                LastHitA.LastHitB();
            }

            if (MiscMenu["useexhaust"].Cast <CheckBox>().CurrentValue)
            {
                foreach (
                    var enemy in
                    ObjectManager.Get <AIHeroClient>()
                    .Where(a => a.IsEnemy && a.IsValidTarget(Exhaust.Range))
                    .Where(enemy => MiscMenu[enemy.ChampionName + "exhaust"].Cast <CheckBox>().CurrentValue))
                {
                    if (enemy.IsFacing(Me))
                    {
                        if (!(Me.HealthPercent < 50))
                        {
                            continue;
                        }
                        Exhaust.Cast(enemy);
                        return;
                    }
                    if (!(enemy.HealthPercent < 50))
                    {
                        continue;
                    }
                    Exhaust.Cast(enemy);
                    return;
                }
            }
        }
Beispiel #7
0
        public static void Init()
        {
            try
            {
                menu = Load.MenuIni.AddSubMenu("SummonerSpells", "SummonerSpells");

                if (Mark.IsVaild() || Player.Spells.Any(s => s.Name.Equals("SummonerPoroThrow")))
                {
                    balls.Init();
                }
                if (Barrier.IsVaild())
                {
                    Borrier.Init();
                }
                if (Clarity.IsVaild())
                {
                    Clarty.Init();
                }
                if (Cleanse.IsVaild())
                {
                    Clanse.Init();
                }
                if (Exhaust.IsVaild())
                {
                    Exhust.Init();
                }
                if (Flash.IsVaild())
                {
                    Flish.Init();
                }
                if (Heal.IsVaild())
                {
                    Heel.Init();
                }
                if (Ignite.IsVaild())
                {
                    Ignoite.Init();
                }
                if (Smite.IsVaild())
                {
                    Smote.Init();
                }

                if (menu.LinkedValues.Count == 0)
                {
                    menu.AddGroupLabel("Your SummonerSpells are not Supported");
                }
            }
            catch (Exception ex)
            {
                Logger.Send("Error At KappaUtility.Brain.Activator.Spells.SummonerSpells.Init", ex, Logger.LogLevel.Error);
            }
        }
Beispiel #8
0
    private void GenerateExhaust()
    {
        GameObject body = transform.Find("Body").gameObject;

        foreach (Transform child in body.transform)
        {
            Exhaust exhaust = child.GetComponent <Exhaust>();
            if (!GetComponent <Entity>().neutral&& exhaust)
            {
                exhaust.SetColor(GetComponent <Entity>().affinity.GetComponent <Fleet>().teamColor);
            }
        }
    }
Beispiel #9
0
        private static void OnInComingDamage_OnIncomingDamage(Common.Events.OnInComingDamage.InComingDamageEventArgs args)
        {
            if (!Summs.menu.CheckBoxValue("Exhaust") || !(args.Sender is AIHeroClient) || !Exhaust.IsReady() || args.Sender.Distance(Player.Instance) > 750 ||
                !Summs.menu.CheckBoxValue("Exhaust" + args.Target.Name()) || !args.Target.IsKillable())
            {
                return;
            }

            if (Summs.menu.CheckBoxValue("Exhaust" + args.Sender.Name()) && Summs.menu.SliderValue("Exhausthp" + args.Sender.Name()) >= args.Sender.HealthPercent)
            {
                Exhaust.Cast(args.Sender);
            }
        }
    public override bool Play(InputController i, Exhaust ex, Vector2 from = default(Vector2), int radius = 0)
    {
        setParams(from, radius - 1);
        //create the character
        GameObject go = Object.Instantiate(Resources.Load <GameObject>("Prefabs/Character"));

        //because the bellow line is commented, this code will not function
        //go.GetComponent<Character>().Set(this);
        ex(this); //ehaust
        //place
        i.Set(InputController.Modes.PLACE_CHAR, go, (Vector2 g) => (targetPred(g) && GameController.Game.CharAtPos(g).gameObject == go));
        return(true);
    }
    public void OptionsActive()
    {
        if (IsMainMenu == true)
        {
            if (mainMenu == "Main Menu")
            {
                /*
                 * //GameObject exhaust = GameObject.Find("ExhaustPrewarm");
                 * GameObject exhaustP = GameObject.Find("Exhaust");
                 * GameObject exhaustC = exhaustP.transform.Find("ExhaustPrewarm").gameObject;
                 * exhaustC.SetActive(false);
                 */
                GameObject[] temp = SceneManager.GetSceneByName("Main Menu").GetRootGameObjects();
                for (int i = 0; i < temp.Length; i++)
                {
                    if (temp[i].name == "Exhaust")
                    {
                        Exh = temp[i].GetComponent <Exhaust>();
                        Exh.StopExhaust();
                    }
                }

                //exhaust.SetActive(false);
                MainMenu.SetActive(false);
                GradeSelect.SetActive(false);
                Options.SetActive(false);
                PauseScreen.SetActive(false);
                InGameOverlay.SetActive(false);
                Labels.SetActive(false);

                Staging.SetActive(false);
                OptionsDash.SetActive(true);
            }
            else
            {
                MainMenu.SetActive(false);
                GradeSelect.SetActive(false);
                Options.SetActive(true);
                PauseScreen.SetActive(false);
                InGameOverlay.SetActive(false);
                Labels.SetActive(false);
            }
        }
        else if (IsMainMenu == false)
        {
            PauseScreen.SetActive(false);
            Options.SetActive(true);
        }
    }
Beispiel #12
0
        public async Task <IActionResult> Create([Bind("DiameterInches,DegreeBend,Material,BrandID,ProductTypeID,ProductName,ProductDescription,VehicleModel,ProductCode,Price,InStock")] Exhaust exhaust, IFormFile file)
        {
            if (ModelState.IsValid)
            {
                _context.Add(exhaust);
                await _context.SaveChangesAsync();

                // tlannigan
                var image = new ImagesController(_context, _hostingEnv);
                image.SaveImage(exhaust.ProductID, file);

                return(RedirectToAction(nameof(Index)));
            }

            ViewData["BrandID"]       = new SelectList(_context.Brands, "BrandID", "BrandName", exhaust.BrandID);
            ViewData["ProductTypeID"] = new SelectList(_context.ProductTypes, "ProductTypeID", "ProductTypeName", exhaust.ProductTypeID);

            return(View(exhaust));
        }
Beispiel #13
0
    void Start()
    {
        rigidbody      = GetComponent <Rigidbody>();
        wheelColliders = GetComponentsInChildren <WheelCollider>();
        for (uint i = 0; i < 4; ++i)
        {
            MeshRenderer mesh = wheelColliders[i].gameObject.GetComponentInChildren <MeshRenderer>();
            wheelMesh[i] = mesh.gameObject;
        }
        carSounds = GetComponent <CarSounds>();
        carGUI    = GetComponent <CarGui>();
        GameObject com = GameObject.Find("COM");

        if (com)
        {
            rigidbody.centerOfMass = com.transform.localPosition;
        }
        exhaust = GetComponent <Exhaust>();
    }
Beispiel #14
0
        [HarmonyPriority(10000)] // Extremely high priority. We want this to happen first, since this will only overwrite RotatableExhaust results
        public static bool Prefix(Exhaust __instance, ConduitConsumer ___consumer, Storage ___storage)
        {
            if (__instance is RotatableExhaust)
            {
                if (___consumer.ConsumptionRate == 0f)
                {
                    return(false);                                   // Don't call super UpdateEmission
                }
                if (___storage.items.Count == 0)
                {
                    return(false);                             // Don't call super UpdateEmission
                }
                Building   component  = __instance.GetComponent <Building>();
                CellOffset cellOffset = component.GetUtilityOutputOffset();
                int        cell       = Grid.PosToCell(__instance.transform.GetPosition() + new Vector3(cellOffset.x, cellOffset.y));

                if (Grid.Solid[cell])
                {
                    return(false);                  // Don't call super UpdateEmission
                }
                ConduitType typeOfConduit = ___consumer.TypeOfConduit;
                if (typeOfConduit != ConduitType.Liquid)
                {
                    if (typeOfConduit == ConduitType.Gas)
                    {
                        // Call private method to emit gas
                        AccessTools.Method(typeof(Exhaust), "EmitGas").Invoke(__instance, new object[] { cell });
                        return(false); // Don't call super UpdateEmission
                    }
                }
                else
                {
                    // Call private method to emit liquid
                    AccessTools.Method(typeof(Exhaust), "EmitLiquid").Invoke(__instance, new object[] { cell });
                    return(false); // Don't call super UpdateEmission
                }
            }
            return(true); // Call super UpdateEmission
        }
Beispiel #15
0
        public async Task <IActionResult> Edit(int id, [Bind("DiameterInches,DegreeBend,Material,BrandID,ProductTypeID,ProductName,ProductDescription,VehicleModel,ProductCode,Price,InStock")] Exhaust exhaust, IFormFile file)
        {
            if (id != exhaust.ProductID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(exhaust);
                    await _context.SaveChangesAsync();

                    // tlannigan
                    if (file != null)
                    {
                        var image = new ImagesController(_context, _hostingEnv);
                        image.DeleteImage(id);
                        image.SaveImage(id, file);
                    }
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ExhaustExists(exhaust.ProductID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["BrandID"]       = new SelectList(_context.Brands, "BrandID", "BrandName", exhaust.BrandID);
            ViewData["ProductTypeID"] = new SelectList(_context.ProductTypes, "ProductTypeID", "ProductTypeName", exhaust.ProductTypeID);
            return(View(exhaust));
        }
Beispiel #16
0
    private void Awake()
    {
        this.rigidBody = GetComponent <Rigidbody>();

        this.motion = new MagicalLightAndSound.PhysicsSystem.Movable(
            this,
            movableType,
            this.transform.position,
            targetPosition,
            Movable.Status.InActive,
            thrust,
            animationCurve);

        this.torpedo = new Weapon(Weapon.Type.Torpedo, Weapon.Status.Disarmed);

        Exhaust torpedoExhaust = new Exhaust(Exhaust.Type.Torpedo);

        this.particleSystemGameObject          = torpedoExhaust.particleSystem;
        this.exhaustParticles                  = particleSystemGameObject.GetComponent <ParticleSystem>();
        this.exhaustParticles.transform.parent = this.transform;
        Debug.Assert(this.exhaustParticles != null, "exhaustParticles should not be null");
    }
Beispiel #17
0
        public string Write()
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine("[attachment]");
            sb.AppendLine(Type.ToString());

            switch (Type)
            {
            case AttachmentType.ComplicatedWheels:
                sb.AppendLine(Wheels.ToString());
                break;

            case AttachmentType.DynamicsFmodEngine:
                sb.Append(FModEngine.ToString());
                break;

            case AttachmentType.Horn:
                sb.AppendLine($"event {Horn}");
                break;

            case AttachmentType.ExhaustParticles:
                sb.Append(Exhaust.ToString());
                break;

            case AttachmentType.ContinuousSound:
                sb.AppendLine($"sound {ContinuousSound}");
                sb.AppendLine($"lump {ContinuousSoundLump}");
                break;

            case AttachmentType.ReverseLightSound:
                sb.AppendLine($"event {ReverseLightSound}");
                break;
            }

            return(sb.ToString());
        }
    private void Awake()
    {
        this.rigidBody = GetComponent <Rigidbody>();

        this.linearMotion = new MagicalLightAndSound.PhysicsSystem.Movable(
            this,
            movableType,
            this.transform.position,
            targetPosition,
            Movable.Status.InActive,
            thrust,
            animationCurve);

        this.orbitalRotation = new Rotatable(Rotatable.Type.ExternalBody, this);

        this.spaceShip = new Vehicle(Vehicle.Type.SpaceShip, Vehicle.Status.Inactive, 100);

        Exhaust torpedoExhaust = new Exhaust(Exhaust.Type.Torpedo);

        this.particleSystemGameObject          = torpedoExhaust.particleSystem;
        this.exhaustParticles                  = particleSystemGameObject.GetComponent <ParticleSystem>();
        this.exhaustParticles.transform.parent = this.transform;
        Debug.Assert(this.exhaustParticles != null, "exhaustParticles should not be null");
    }
Beispiel #19
0
 public override bool Play(InputController i, Exhaust ex, Vector2 from = default(Vector2), int radius = 0)
 {
     ex(this); //will be changed once I get around to overhauling terrain cards
     return(i.Set(InputController.Modes.PLACE_BOARD, Board.gameObject));
 }
Beispiel #20
0
            //---------------------------------------------Combo()------------------------------------------------

            public static void Combo()
            {
                if (RRange && R.IsReady())
                {
                    PosAndHits = GetBestRPos(Target.ServerPosition.To2D());

                    if (Menu["UseRCombo"].Cast <CheckBox>().CurrentValue&& PosAndHits.First().Value >= Menu["Min Enemies R"].Cast <Slider>().CurrentValue)
                    {
                        if (Menu["RWithStun"].Cast <CheckBox>().CurrentValue)
                        {
                            if (Player.HasBuff("pyromania_particle"))
                            {
                                R.Cast(PosAndHits.First().Key.To3D());
                            }
                        }
                        else
                        {
                            R.Cast(PosAndHits.First().Key.To3D());
                        }
                    }
                }

                if (Menu["UseQCombo"].Cast <CheckBox>().CurrentValue&& QIsReady && RRange)
                {
                    Q.Cast(Target);
                }

                if (Menu["UseWCombo"].Cast <CheckBox>().CurrentValue&& WIsReady && RRange)
                {
                    var WPos = GetBestWPos();
                    if (WPos != default(Vector3))
                    {
                        W.Cast(WPos);
                    }
                }

                if (Smite != null)
                {
                    if (Smite.IsInRange(Target) && Smite.IsReady())
                    {
                        if (Smite.Name.Contains("gank"))
                        {
                            Smite.Cast(Target);
                        }
                        else if (Smite.Name.Contains("duel") && Player.IsInAutoAttackRange(Target))
                        {
                            Smite.Cast(Target);
                        }
                    }
                }

                if (Talisma.IsReady() && CountAlliesInRange(650) > 0)
                {
                    Talisma.Cast();
                }

                if (Exhaust != null && Menu["UseExhaust?"].Cast <CheckBox>().CurrentValue&& TargetSelector.GetPriority(Target) > 3 && Target.IsValidTarget(Exhaust.Range))
                {
                    Exhaust.Cast(Target);
                }

                return;
            }
Beispiel #21
0
 // Use this for initialization
 void Start()
 {
     submarine = LevelController.instance.submarine;
     exhaust   = submarine.exhaust;
 }
Beispiel #22
0
        public static void UseSummoner(SummonerSpellsEnum summoner)
        {
            switch (summoner)
            {
            case SummonerSpellsEnum.Exhaust:
            {
                if (Exhaust == null || !Exhaust.IsReady() || !Main.SpellsMenu.VChecked("Exhaust.Enabled") || (Player.HasBuffOfType(BuffType.Invisibility) && Main.SpellsMenu.VChecked("Exhaust.Stealth")) ||
                    (Main.SpellsMenu.VChecked("Exhaust.Combo") && !Orbwalker.ActiveModes.Combo.IsOrb()))
                {
                    break;
                }
                var target = EntityManager.Heroes.Enemies.Where(x => x.IsValidTarget(Exhaust.Range) &&
                                                                (Main.SpellsMenu.VSliderValue("Exhaust.EnemyHP") <= x.HealthPercent ||
                                                                 EntityManager.Heroes.Allies.Any(ally => ally.IsValidTarget(800) && Main.SpellsMenu.VSliderValue("Exhaust.AllyHP") <= ally.HealthPercent)));
                switch (Main.SpellsMenu.VComboValue("Exhaust.Target"))
                {
                case 0:
                {
                    target.OrderByDescending(x => TargetSelector.GetPriority(x));
                }
                break;

                case 1:
                {
                    target.OrderBy(x => x.Health);
                }
                break;

                case 2:
                {
                    target.OrderByDescending(x => x.TotalAttackDamage);
                }
                break;

                case 3:
                {
                    target.OrderByDescending(x => x.TotalMagicalDamage);
                }
                break;

                case 4:
                {
                    target.OrderByDescending(x => x.MoveSpeed);
                }
                break;

                case 5:
                {
                    target.OrderByDescending(x => x.PercentAttackSpeedMod);
                }
                break;
                }
                if (target.Any())
                {
                    Exhaust.Cast(target.First());
                }
            }
            break;

            case SummonerSpellsEnum.Heal:
            {
                if (Heal == null || !Heal.IsReady() || !Main.SpellsMenu.VChecked("Heal.Enabled") || (Player.HasBuffOfType(BuffType.Invisibility) && Main.SpellsMenu.VChecked("Heal.Stealth")) ||
                    (Main.SpellsMenu.VChecked("Heal.Combo") && !Orbwalker.ActiveModes.Combo.IsOrb()))
                {
                    break;
                }
                var allies = EntityManager.Heroes.Allies.Where(x => x.IsValidTarget(Heal.Range) && x.HealthPercent <= (x.IsMe ? Main.SpellsMenu.VSliderValue("Heal.MyHP") : Main.SpellsMenu.VSliderValue("Heal.AllyHP")));
                if (!allies.Any())
                {
                    break;
                }
                var dic = new Dictionary <Obj_AI_Base, int>();
                foreach (var ally in allies)
                {
                    dic.Add(ally, 500);
                }
                if (!Main.SpellsMenu.VChecked("Heal.Smart") || Prediction.Health.GetPrediction(dic).Any(x => x.Value <= 0))
                {
                    Heal.Cast();
                }
            }
            break;

            case SummonerSpellsEnum.Ignite:
            {
                if (Ignite == null || !Ignite.IsReady() || !Main.SpellsMenu.VChecked("Ignite.Enabled") ||
                    (Main.SpellsMenu.VChecked("Ignite.Combo") && !Orbwalker.ActiveModes.Combo.IsOrb()))
                {
                    break;
                }
                var target = EntityManager.Heroes.Enemies.Where(t =>
                                                                t.IsValidTarget(Ignite.Range) &&
                                                                t.Health <= Player.Instance.GetSummonerSpellDamage(t, DamageLibrary.SummonerSpells.Ignite)).FirstOrDefault();

                if (target == null)
                {
                    break;
                }
                Ignite.Cast(target);
            }
            break;

            case SummonerSpellsEnum.Mark:
            {
                if (Mark == null || !Mark.IsReady() || !Main.SpellsMenu.VChecked("Mark.Enabled") ||
                    !Orbwalker.ActiveModes.Combo.IsOrb())
                {
                    break;
                }
                var target = Mark.GetTarget();
                if (target == null)
                {
                    break;
                }
                var pred = Mark.GetPrediction(target);
                if (pred.CanNext(Mark, Main.SpellsMenu.VSliderValue("Mark.Percent"), true))
                {
                    Mark.Cast(pred.CastPosition);
                }
            }
            break;

            case SummonerSpellsEnum.Smite:
            {
                if (Smite == null || !Smite.IsReady() || !Main.SpellsMenu.VChecked("Smite.Enabled"))
                {
                    break;
                }
                var target = EntityManager.Heroes.Enemies.Where(t =>
                                                                t.IsValidTarget(Smite.Range) &&
                                                                t.Health <= Player.Instance.GetSummonerSpellDamage(t, DamageLibrary.SummonerSpells.Smite)).FirstOrDefault();
                var minion = ObjectManager.Get <Obj_AI_Minion>()
                             .FirstOrDefault(m => m.Health < Player.Instance.GetSummonerSpellDamage(m, DamageLibrary.SummonerSpells.Smite) &&
                                             m != null && m.IsMonster && m.IsImportant() && Smite.IsInRange(m));
                if (minion != null)
                {
                    Smite.Cast(minion);
                }
                if (target != null)
                {
                    Smite.Cast(target);
                }
            }
            break;

            case SummonerSpellsEnum.Barrier:
            {
                if (Barrier == null || !Barrier.IsReady() || !Main.SpellsMenu.VChecked("Barrier.Enabled") || (Player.HasBuffOfType(BuffType.Invisibility) && Main.SpellsMenu.VChecked("Barrier.Stealth")) ||
                    (Main.SpellsMenu.VChecked("Barrier.Combo") && !Orbwalker.ActiveModes.Combo.IsOrb()) || Player.Instance.HealthPercent > Main.SpellsMenu.VSliderValue("Barrier.MyHP"))
                {
                    break;
                }
                if (!Main.SpellsMenu.VChecked("Barrier.Smart") || Prediction.Health.GetPrediction(Player.Instance, 800) <= 0)
                {
                    Barrier.Cast();
                }
            }
            break;

            default:
            {
                break;
            }
            }
        }
 public override bool Play(InputController i, Exhaust e, Vector2 from = default(Vector2), int radius = 0)
 {
     effect(Owner);
     e(this);
     return(true);
 }
    public void MainMenuActive()
    {
        Credit.SetActive(false);
        goback            = true;
        equationgen       = true;
        stopTime.TheWorld = true;// in timer
        stopTime.timeStop = false;
        BC = FindObjectOfType <Boxcount>().GetComponent <Boxcount>();
        BC.DeletAll();
        if (MainMenu.activeSelf == false)
        {
            /*GameObject exhaustP = GameObject.Find("Exhaust");
             * GameObject exhaustC = exhaustP.transform.Find("ExhaustPrewarm").gameObject;
             * exhaustC.SetActive(true);
             * //exhaust.SetActive(true);
             */
            GameObject[] temp = SceneManager.GetSceneByName("Main Menu").GetRootGameObjects();
            for (int i = 0; i < temp.Length; i++)
            {
                if (temp[i].name == "Exhaust")
                {
                    Exh = temp[i].GetComponent <Exhaust>();
                    Exh.PlayExhoust();
                }
            }

            Debug.Log("testing!!!");
            if (musicTriger)
            {
                mainMu.Play();
                gameAb.Stop();
                gameMu.Stop();
                musicTriger = false;
                Debug.Log("Play main menu music");
            }//if (CameraTransitions.GetBool("MenuTOGrade") == true)
            //{
            //    CameraTransitions.SetBool("MenuTOGrade", false);
            //    CameraTransitions.SetBool("GradeTOMenu", true);
            //}
            if (mainMenu == "Main Menu")
            {
                if (Staging.activeSelf == false)
                {
                    OptionsDash.SetActive(false);
                    Staging.SetActive(true);
                    MainMenu.SetActive(true);
                    HighScore.SetActive(false);
                }
                else
                {
                    MainMenu.SetActive(true);
                    GradeSelect.SetActive(false);
                    Options.SetActive(false);
                    PauseScreen.SetActive(false);
                    InGameOverlay.SetActive(false);
                    Labels.SetActive(false);
                    HighScore.SetActive(false);
                }
            }
            else
            {
                MainMenu.SetActive(true);
                GradeSelect.SetActive(false);
                Options.SetActive(false);
                PauseScreen.SetActive(false);
                InGameOverlay.SetActive(false);
                Labels.SetActive(false);

                OptionsDash.SetActive(false);
                Staging.SetActive(true);
                HighScore.SetActive(false);
            }

            //CameraTransitions = FindObjectOfType<Animator>().GetComponent<Animator>();
            //if (CameraTransitions.GetBool("MenuTOGrade") == true)
            //{
            //    CameraTransitions.SetBool("MenuTOGrade", false);
            //    CameraTransitions.SetBool("GradeTOMenu", true);
            //}
        }
    }
Beispiel #25
0
 public override bool Play(InputController i, Exhaust ex, Vector2 from = default(Vector2), int radius = 0)
 {
     setParams(from, radius);
     /**/ Debug.Log("Casting from " + from.x.ToString() + "," + from.y.ToString());
     return(i.Set(InputController.Modes.TARGET, targetPred, (Vector2 s) => { ex(this); Effect(s); }));
 }
Beispiel #26
0
 public override bool Play(InputController i, Exhaust e, Vector2 from = default(Vector2), int radius = 0)
 {
     return(base.Play(i, (Card c) => { e(c); axis.Exhaust(c); }, from, radius));
 }
Beispiel #27
0
    public VehicleModel()
    {
        VehicleOverview = new VehicleOverview();
        engine          = new Engine();
        starter         = new Starter();
        gearBox         = new GearBox();
        vehGearNum      = 0;
        for (int i = 0; i < subGears.Length; i++)
        {
            subGears[i] = new SubGear();
        }
        windForce      = new WindForce();
        steeringFactor = new SteeringFactor();
        steering       = new Steering();
        fuelTank       = new FuelTank();

        for (int i = 0; i < otherSteerings.Length; i++)
        {
            otherSteerings[i] = new OtherSteering();
        }
        carVibration        = new CarVibration();
        brakesCommon        = new Brakes();
        physicsCrashSetting = new PhysicsCrashSetting();
        ignoreHeadCollision = false;
        exhaust             = new Exhaust();
        roughness           = new Roughness();
        engineHealth        = new EngineHealth();
        fuelTankOnCrash     = 0;
        engineParticles     = new EngineParticles();
        gearboxSettings     = new GearboxSettings();
        wheels                       = new Wheel();
        body                         = new Body();
        bumper                       = new Bumper();
        windowGlass                  = new WindowGlass();
        light                        = new Light();
        licencePlate                 = new LicencePlate();
        mirror                       = new Mirror();
        wing                         = new Wing();
        door                         = new Door();
        roof                         = new Roof();
        unknown                      = new Unknown();
        engineSoundSet               = new EngineSoundSet();
        engineSound1                 = new EngineSound();
        engineSound2                 = new EngineSound();
        engineSound3                 = new EngineSound();
        engineSound4                 = new EngineSound4();
        insideSoundSet               = new InsideSoundSet();
        carSmallHitType              = new CarSmallHitType();
        carShortCrashTypeB1          = new CarShortCrashType();
        carShortCrashWithGlassTypeC1 = new CarShortCrashType();
        unknownSound1                = "";
        unknownSound2                = "";
        engineStartSound             = new EngineStartSound();
        engineSoundDriving           = new EngineSoundDriving();
        for (int i = 0; i < engineSoundOnGears.Length; i++)
        {
            engineSoundOnGears[i] = new EngineSoundOnGear();
        }
        engineSoundIdle             = new EngineSoundIdle();
        wheelSoundWhilePunctured    = new WheelSoundWhilePunctured();
        carSmallHitType1            = new CarSmallHitType();
        carLongCrashType1           = new CarLongCrashType();
        carShortCrashWithGlassType1 = new CarShortCrashType();
        doorOpenCloseSound          = new DoorOpenCloseSound();
        insideSoundSet               = new InsideSoundSet();
        carSmallHitType              = new CarSmallHitType();
        carLongCrashType2            = new CarLongCrashType();
        carShortCrashTypeB1          = new CarShortCrashType();
        carShortCrashWithGlassTypeC1 = new CarShortCrashType();
        unknownSound1               = "";
        unknownSound2               = "";
        carShortCrashTypeB2         = new CarShortCrashType();
        carShortCrashWithGlassType1 = new CarShortCrashType();
        doorOpenCloseSound          = new DoorOpenCloseSound();
    }
Beispiel #28
0
            //---------------------------------------------Combo()------------------------------------------------

            public static void Combo()
            {
                if (R.IsReady() && Menu["UseRCombo"].Cast <CheckBox>().CurrentValue&& R.IsInRange(Target) && SpellDamage(Target, SpellSlot.R) >= Target.Health)
                {
                    R.HitChanceCast(Target, 70);
                }

                if (W.IsReady() && (WRange || (Q.IsReady() && QRange)) && Menu["UseWCombo"].Cast <CheckBox>().CurrentValue)
                {
                    var WPos = Prediction.Position.PredictUnitPosition(Target, 1000).To3D(); W.Cast(CorrectRange(WPos, W.Range));
                }

                else if (Orbwalker.ValidAzirSoldiers.Any())
                {
                    if (Q.IsReady() && Menu["UseQCombo"].Cast <CheckBox>().CurrentValue&& QRange)
                    {
                        Q.HitChanceCast(Target, Menu["QHitChanceCombo"].Cast <Slider>().CurrentValue);
                    }
                    if (E.IsReady() && Menu["UseECombo"].Cast <CheckBox>().CurrentValue)
                    {
                        CastE(Target);
                    }
                }

                if (Smite != null)
                {
                    if (Smite.IsInRange(Target) && Smite.IsReady())
                    {
                        if (Smite.Name.Contains("gank"))
                        {
                            Smite.Cast(Target);
                        }
                        else if (Smite.Name.Contains("duel") && Player.IsInAutoAttackRange(Target))
                        {
                            Smite.Cast(Target);
                        }
                    }
                }

                if (Talisma.IsReady() && Player.CountAlliesInRange(600) > 0)
                {
                    Talisma.Cast();
                }

                if (Exhaust != null && Menu["UseExhaust?"].Cast <CheckBox>().CurrentValue&& TargetSelector.GetPriority(Target) > 3 && Target.IsValidTarget(Exhaust.Range))
                {
                    Exhaust.Cast(Target);
                }

                if (Target.IsValidTarget(500) && Randuin.IsReady())
                {
                    Randuin.Cast();
                }

                if (Target.IsValidTarget(700) && Hextech.IsReady())
                {
                    Hextech.Cast(Target);
                }

                return;
            }
Beispiel #29
0
            //---------------------------------------------Combo()------------------------------------------------

            public static void Combo()
            {
                if (!EBuff())
                {
                    if (Menu["UseECombo"].Cast <CheckBox>().CurrentValue&& EIsReady && ERange)
                    {
                        E.Cast();
                    }
                    if (Menu["UseQCombo"].Cast <CheckBox>().CurrentValue&& QIsReady && QRange)
                    {
                        Q.HitChanceCast(Target, 75);
                    }
                }

                if (Menu["UseRCombo"].Cast <CheckBox>().CurrentValue&& Player.CountEnemiesInRange(R.Range) >= Menu["Min Enemies R"].Cast <Slider>().CurrentValue)
                {
                    R.Cast();
                }

                if (Menu["UseWCombo"].Cast <CheckBox>().CurrentValue&& WIsReady && WRange && Target.HasBuff("kennenmarkofstorm"))
                {
                    W.Cast();
                }

                if (Smite != null)
                {
                    if (Smite.IsInRange(Target) && Smite.IsReady())
                    {
                        if (Smite.Name.Contains("gank"))
                        {
                            Smite.Cast(Target);
                        }
                        else if (Smite.Name.Contains("duel") && Player.IsInAutoAttackRange(Target))
                        {
                            Smite.Cast(Target);
                        }
                    }
                }

                if (Talisma.IsReady() && CountAlliesInRange(650) > 0)
                {
                    Talisma.Cast();
                }

                if (Exhaust != null && Menu["UseExhaust?"].Cast <CheckBox>().CurrentValue&& TargetSelector.GetPriority(Target) > 3 && Target.IsValidTarget(Exhaust.Range))
                {
                    Exhaust.Cast(Target);
                }

                if (ERange && GhostBlade.IsReady())
                {
                    GhostBlade.Cast();
                }

                if (Target.IsValidTarget(550) && BOTRK.IsReady())
                {
                    BOTRK.Cast(Target);
                }

                if (Target.IsValidTarget(550) && Bilgewater.IsReady())
                {
                    Bilgewater.Cast(Target);
                }

                if (Target.IsValidTarget(500) && Randuin.IsReady())
                {
                    Randuin.Cast();
                }

                if (Target.IsValidTarget(700) && Hextech.IsReady())
                {
                    Hextech.Cast(Target);
                }

                return;
            }