コード例 #1
0
 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();
     }
 }
コード例 #2
0
        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);
            }
        }