Ejemplo n.º 1
0
        public void OnLoad()
        {
            Variables.Hero = ObjectManager.LocalHero;
            this.pause     = Variables.Hero.ClassID != ClassID.CDOTA_Unit_Hero_Invoker;
            if (this.pause)
            {
                return;
            }
            Variables.MenuManager = new MenuManager(Me.Name);
            this.coldSnap         = new ColdSnap();
            this.alacrity         = new Alacrity();
            this.chaosMeteor      = new ChaosMeteor();
            this.deafeningBlast   = new DeafeningBlast();
            this.forgeSpirit      = new ForgeSpirit();
            this.ghostWalk        = new GhostWalk();
            this.iceWall          = new IceWall();
            this.sunStrike        = new SunStrike();
            this.tornado          = new Tornado();
            this.emp         = new EMP();
            Variables.Quas   = Me.Spellbook.SpellQ;
            Variables.Wex    = Me.Spellbook.SpellW;
            Variables.Exort  = Me.Spellbook.SpellE;
            Variables.Invoke = Me.Spellbook.SpellR;

            Variables.MenuManager.Menu.AddToMainMenu();
            Variables.EnemyTeam = Me.GetEnemyTeam();
            this.targetFind     = new TargetFind();
            Game.PrintMessage(
                "Invoker" + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version + " loaded",
                MessageType.LogMessage);
        }
Ejemplo n.º 2
0
    // Alacrity
    IEnumerator Alacrity(GameObject prefab, float duration, float attackSpeed, float bonusDamage)
    {
        while (!Input.GetButtonUp("Fire1"))
        {
            Ray        ray = Camera.main.ScreenPointToRay(Input.mousePosition);
            RaycastHit hit;

            Physics.Raycast(ray, out hit);
            if ((hit.collider.CompareTag("Player") || hit.collider.CompareTag("Ally")) && Input.GetButtonDown("Fire1"))
            {
                print("Casted: Alacrity on " + hit.collider.name);
                GameObject alacrity = Instantiate(prefab, hit.transform.position + transform.up * 2, Quaternion.identity) as GameObject;
                alacrity.transform.SetParent(hit.transform);
                Alacrity _alacrity = alacrity.GetComponent <Alacrity>();
                _alacrity.Duration    = duration;
                _alacrity.AttackSpeed = attackSpeed;
                _alacrity.BonusDamage = bonusDamage;
            }
            yield return(null);
        }
    }