public static void addButtonToOneKeyPressAndReleaseMapping(StateControllerMapping scm, FFXICompanion.Settings.Button controllerButton, Settings.Action buttonAction, Settings.Key key) { ControllerMapping cm = new ControllerMapping(); cm.button = new ControllerButton(controllerButton, buttonAction); cm.keyPressesCommand = new KeyPressesCommand(); cm.keyPressesCommand.keyPresses.Add(new KeyPress(key, Settings.Action.PRESSED)); cm.keyPressesCommand.keyPresses.Add(new KeyPress(key, Settings.Action.RELEASED)); scm.controllerMappings.Add(cm); }
public static void addButtonToKeyPressMapping(StateControllerMapping scm, FFXICompanion.Settings.Button controllerButton, Settings.Action buttonAction, Settings.Key key, Settings.Action keyPress1) { ControllerMapping cm = new ControllerMapping(); cm.button = new ControllerButton(controllerButton, buttonAction); cm.keyPressesCommand = new KeyPressesCommand(); cm.keyPressesCommand.keyPresses.Add(new KeyPress(key, keyPress1)); scm.controllerMappings.Add(cm); }
public static string Strings(this Settings.Key key) { switch (key) { case Settings.Key.Music: return(Settings.MUSIC); case Settings.Key.Sound: return(Settings.SOUND); case Settings.Key.Voice: return(Settings.VOICE); case Settings.Key.VoiceStyle: return(Settings.VOICE_STYLE); case Settings.Key.Resolution: return(Settings.RESOLUTION); default: throw new UnityException(); } }
public static void addTwoButtonStateTransition(CompanionSettings settings, string stateName, string transitionName, FFXICompanion.Settings.Button button1, FFXICompanion.Settings.Button button2, Settings.Key key) { StateTransition stateTransition = new StateTransition(); stateTransition.stateName = stateName; stateTransition.transitionName = transitionName; stateTransition.key = key; stateTransition.transitionButtons.Add(new ControllerButton(button1, Settings.Action.PRESSED)); stateTransition.transitionButtons.Add(new ControllerButton(button2, Settings.Action.PRESSED)); settings.stateTransitions.Add(stateTransition); }