Beispiel #1
0
 public GameEngine(IMemoryAPI fface)
 {
     _fface         = fface;
     _stateMachine  = new FiniteStateMachine(fface);
     _playerMonitor = new PlayerMonitor(fface);
     //_chatMonitor = new ChatMonitor(fface);
 }
Beispiel #2
0
 private void SingletonMaker()
 {
     if (main == null)
     {
         DontDestroyOnLoad(gameObject);
         main = this;
         Debug.Log("Player is created");
     }
     else if (main != this)
     {
         Destroy(gameObject);
     }
 }
Beispiel #3
0
        private void OnJungleClear()
        {
            var Minion =
                MinionManager.GetMinions(
                    ObjectManager.Player.ServerPosition,
                    Variables.Spells[SpellSlot.W].Range,
                    MinionTypes.All,
                    MinionTeam.Neutral,
                    MinionOrderTypes.MaxHealth).FirstOrDefault();
            var target = Minion ?? PlayerMonitor.GetLastTarget();

            if (Variables.AssemblyMenu.GetItemValue <bool>("dzaio.champion.trundle.jungleclear.w") &&
                Variables.Spells[SpellSlot.W].IsReady() && target.IsValidTarget(675f))
            {
                Variables.Spells[SpellSlot.W].Cast(ObjectManager.Player.ServerPosition.Extend(target.Position, ObjectManager.Player.Distance(target) / 2f));
            }

            if (Variables.AssemblyMenu.GetItemValue <bool>("dzaio.champion.trundle.jungleclear.q") &&
                Variables.Spells[SpellSlot.Q].IsReady() && target.IsValidTarget(Variables.Spells[SpellSlot.Q].Range))
            {
                Variables.Spells[SpellSlot.Q].Cast();
            }
        }