public InputManagerInitializer(InputConfigs inputConfigs, IControllableCharacterData _characterData) { var movementInputView = UnityEngine.Object.FindObjectOfType <MovementInputView>(); if (movementInputView == null) { movementInputView = UnityEngine.Object.Instantiate(inputConfigs.InputManagerPrefab).GetComponent <MovementInputView>(); } var movementInputController = new MovementInputController(movementInputView, _characterData); }
internal void InitializeUi(HomelandsGame game) { List <ePlayerAction> actions = InputConfigs.GetPlayerActions(); foreach (ePlayerAction action in actions) { KeyCode key = InputSettings.GetKeyCode(action); InstantiateHelpLine(action, key); } }
public AudioTabViewModel() : base(NameKey, SettingsTabCategory.Audio) { OutputDevices = ClientModel.Player.Devices; InputDevices = ClientModel.Recorder.Devices; InputConfigs = new[] { new AudioQuality(1, 8, 22050), new AudioQuality(1, 16, 22050), new AudioQuality(1, 8, 44100), new AudioQuality(1, 16, 44100) }; SelectedOutputIndex = OutputDevices.IndexOf(Settings.Current.OutputAudioDevice); SelectedInputIndex = InputDevices.IndexOf(Settings.Current.InputAudioDevice); SelectedConfigIndex = InputConfigs.IndexOf(new AudioQuality(1, Settings.Current.Bits, Settings.Current.Frequency)); if (SelectedOutputIndex == -1) { SelectedOutputIndex = 0; } if (SelectedInputIndex == -1) { SelectedInputIndex = 0; } if (SelectedConfigIndex == -1) { SelectedConfigIndex = 0; } SelectButtonName = Settings.Current.RecorderKey.ToString(); SelectKeyCommand = new Command(SelectKey); }