Esempio n. 1
0
 private void initP2Settings(GameType type)
 {
     currentSettings = PreGameSlotTypes.getSlotOptions(type);
     p2Settings.ClearOptions();
     p2Settings.AddOptions(currentSettings.Select(s => s.ToString()).ToList());
     newp2SettingSelected(0);
 }
Esempio n. 2
0
        public void newp2SettingSelected(int value)
        {
            if (isAdmin == false) //Should never happen
            {
                return;
            }

            p2Slot.type = currentSettings[value];
            if (p2Slot.type == PreGameSlotType.TrainingBot)
            {
                p2Slot.playerInfo = LocalTrainingBots.StandardTrainingBotInfo;
            }
            else if (p2Slot.type == PreGameSlotType.SelfClone)
            {
                p2Slot.playerInfo = PreGameSlotTypes.getSelfInfo(localInfo);
            }
            else if (p2Slot.type == PreGameSlotType.Human)
            {
                p2Slot.playerInfo = PreGameSlotTypes.getHumanInfo(localInfo);
            }

            sendChangeSlot();
        }