public async Task RunBot(Log log) { var active = true; AI ai = new AI(log); RotarZairo rotoZairo = new RotarZairo(ai); Smokie smokie = new Smokie(ai); EclipseSouthGate eclipseSG = new EclipseSouthGate(ai); EclipseLabyrinth eclipseL = new EclipseLabyrinth(ai); Mastering mastering = new Mastering(ai); VocalWestGate vocalWG = new VocalWestGate(ai); VagabondWolf vagabondWolf = new VagabondWolf(ai); Toad toad = new Toad(ai); VocalLabyrinth VocalL = new VocalLabyrinth(ai); DragonFly dragonFly = new DragonFly(ai); WoodGoblin woodGoblin = new WoodGoblin(ai); //toad //vagabond-wolf //dragon-fly //MonsterList monsterList = new MonsterList( // //rotoZairo // smokie // ); var monsterList = new List <Monster>() { smokie, eclipseSG, eclipseL, VocalL, mastering, vocalWG, rotoZairo, vagabondWolf, toad, woodGoblin, dragonFly }; ScanMini scanMini = new ScanMini(ai, new OCR(), ai.Log); var _hunt = new Hunt(scanMini); var mobs = monsterList;//monsterList.GetMonsterList(); while (active) { var nextMonster = await GetNextMonster(_hunt, mobs); bool arrived = await nextMonster.GoToLocation(); if (arrived) { await nextMonster.Hunt(); } //await ScheduleHunt(_hunt, mobs); } }
public void attachTo(GameObject target) { if (target.GetComponent <FemaleFrog>() != null || target.GetComponent <Toad>() != null) { Vector3 attachTarget = target.transform.Find("Marker").transform.position; this.transform.position = attachTarget; setBehaviourState(behaviourStates.PIGGYBACKING); if (target.GetComponent <FemaleFrog>() != null) { FemaleFrog partner = target.GetComponent <FemaleFrog>(); partner.setPartner(this); } else if (target.GetComponent <Toad>() != null) { Toad partner = target.GetComponent <Toad>(); partner.setPartner(this); } Debug.Log("Áttaching to " + target); this.transform.rotation = target.transform.rotation; this.transform.SetParent(target.transform); this.tag = "Tag"; } }
public static ILifePattern ChoosePattern() { Console.WriteLine("Available pattern:"); Console.WriteLine("0: GliderGun"); Console.WriteLine("1: Acorn"); Console.WriteLine("2: DieHard"); Console.WriteLine("3: Pentadecathlon"); Console.WriteLine("4: Pulsar"); Console.WriteLine("5: Toad"); Console.WriteLine("6: Beacon"); Console.WriteLine("7: Blinker"); Console.WriteLine("8: AcornDoubleMirror"); Console.WriteLine("9: AcornMirror"); string choosen = Console.ReadLine(); int patternChoosen = 0; if (!string.IsNullOrWhiteSpace(choosen)) { patternChoosen = Convert.ToInt32(choosen); } ILifePattern pattern; switch (patternChoosen) { case 0: pattern = new GliderGun(); break; case 1: pattern = new Acorn(); break; case 2: pattern = new Diehard(); break; case 3: pattern = new Pentadecathlon(); break; case 4: pattern = new Pulsar(); break; case 5: pattern = new Toad(); break; case 6: pattern = new Beacon(); break; case 7: pattern = new Blinker(); break; case 8: pattern = new AcornDoubleMirror(); break; case 9: pattern = new AcornMirror(); break; default: pattern = new Acorn(); break; } return(pattern); }