public override void initPreGameLobby(Sprite gameSprite, PreGameRoomMsg roomInfo) { base.initPreGameLobby(gameSprite, roomInfo); p2Settings.ClearOptions(); p2Settings.AddOptions(LocalTrainingBots.getBotModeNames(type)); p2Settings.value = LocalTrainingBots.getStandardSettings(type); hasStoredSettings = false; }
private static void addLocalPlayer(PreGameSlotType type) { if (type == PreGameSlotType.Player) { ClientPlayersHandler.addSelf(); } else if (type == PreGameSlotType.TrainingBot) { LocalTrainingBots.addBot(gameSpecs.type); } else if (type == PreGameSlotType.SelfClone) { ClientPlayersHandler.addClone(); } else if (type == PreGameSlotType.Human) { ClientPlayersHandler.addHuman(); } }
public override void setLocalPreGamePlayers() { base.setLocalPreGamePlayers(); ClientPlayersHandler.addSelf(); if (hasStoredSettings == false) { savedSettings = p2Settings.value; hasStoredSettings = true; } //Hardcoded check if the Bot Setting is actually Human print("Name: " + LocalTrainingBots.getBotSettingsName(type, savedSettings)); if (LocalTrainingBots.getBotSettingsName(type, savedSettings) == "Human") { ClientPlayersHandler.addHuman(); } else { LocalTrainingBots.addBot(type, savedSettings); } }