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); }
/// <summary> /// Converts characters to their corresponding Entities. /// </summary> /// <param name="character">The character to convert.</param> /// <returns>The corresponding Entity.</returns> private Entity ConvertTiles(char character) { switch (character) { case '-': case '$': case '%': DefaultPlatform defaultPlatform = new DefaultPlatform(); if(character == '$') { defaultPlatform.Velocity.X = 100F; } else if(character == '%') { defaultPlatform.Velocity.X = -100F; } return defaultPlatform; case '+': case '&': case '(': HotPlatform hotPlatform = new HotPlatform(); if (character == '&') { hotPlatform.Velocity.X = 100F; } else if (character == '(') { hotPlatform.Velocity.X = -100F; } return hotPlatform; case '@': case '!': case '~': IcePlatform icePlatform = new IcePlatform(); if (character == '!') { icePlatform.Velocity.X = 100F; } else if (character == '~') { icePlatform.Velocity.X = -100F; } return icePlatform; case 'X': return new GoalTile(); case 'W': return new WaterTile(); case '1': return new PlayerCreature(); case '#': case '/': case '>': DefaultWall defaultWall = new DefaultWall(); if (character == '/') { defaultWall.Velocity.X = 100F; } else if (character == '>') { defaultWall.Velocity.X = -100F; } return defaultWall; case '^': case '<': case '\\': HotWall hotWall = new HotWall(); if (character == '<') { hotWall.Velocity.X = 100F; } else if (character == '\\') { hotWall.Velocity.X = -100F; } return hotWall; case '*': case '[': case ']': IceWall iceWall = new IceWall(); if (character == '[') { iceWall.Velocity.X = 100F; } else if (character == ']') { iceWall.Velocity.X = -100F; } return iceWall; case 'T': return new TurtleCreature(); case 'R': RocketCreature rocketLeft = new RocketCreature(); rocketLeft.MoveSpeed = new Vector2(-600F, 0F); return rocketLeft; case 'r': RocketCreature rocketRight = new RocketCreature(); rocketRight.MoveSpeed = new Vector2(600F, 0F); return rocketRight; case 'S': return new SparkyCreature(); case 'A': return new WildFlame(); case 'B': return new StalkerFlame(); case 'C': return new FlameCreature(); case 'k': return new ShieldTile(); case 'z': return new BananaTile(); default: TileEntity tile = new TileEntity(); tile.CanCollide = false; return tile; } }