private void autoAddWarrior(WarriorT wType = WarriorT.Default) { if (wType != WarriorT.Default) { addWarrior(wType); return; } if (isCreate) { direct = rand.Next(0, level); } switch (direct) { case 0: isCreate = addSword(); break; case 1: isCreate = addArrow(); break; case 2: isCreate = addShield(); break; case 3: isCreate = addHatchet(); break; case 4: isCreate = addRocket(); break; case 5: isCreate = addWall(); break; case 6: isCreate = addRescue(); break; default: isCreate = true; break; } }
private void addWarrior(WarriorT wType = WarriorT.Default) { switch (wType) { case WarriorT.Sword: isCreate = addSword(); break; case WarriorT.Arrow: isCreate = addArrow(); break; case WarriorT.Shield: isCreate = addShield(); break; case WarriorT.Hachet: isCreate = addHatchet(); break; case WarriorT.Rocket: isCreate = addRocket(); break; case WarriorT.Wall: isCreate = addWall(); break; case WarriorT.Rescue: isCreate = addRescue(); break; default: isCreate = true; break; } }
public void auto(WarriorT wType = WarriorT.Default) { autoFixLine(); autoAddWarrior(wType); }