示例#1
0
        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);
        }
示例#2
0
    internal void InitializeUi(HomelandsGame game)
    {
        List <ePlayerAction> actions = InputConfigs.GetPlayerActions();

        foreach (ePlayerAction action in actions)
        {
            KeyCode key = InputSettings.GetKeyCode(action);
            InstantiateHelpLine(action, key);
        }
    }
示例#3
0
        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);
        }