protected override void AddDaisyChains() { AddDaisyChain(UserActionType.MoveJump, UserActionType.MoveStand); AddDaisyChain(UserActionType.MoveForward, UserActionType.Move); AddDaisyChain(UserActionType.MoveRun, UserActionType.Move); AddDaisyChain(UserActionType.MoveLeft, UserActionType.Move); AddDaisyChain(UserActionType.MoveRight, UserActionType.Move); AddDaisyChain(UserActionType.MoveJump, UserActionType.Move); AddDaisyChain(UserActionType.MoveStand, UserActionType.Move); AddDaisyChain(UserActionType.MoveCrouch, UserActionType.Move); for (int i = 0; i < CurrentActionSettings.Count; i++) { ActionSetting a = CurrentActionSettings [i]; if (a.ActionDescription.Equals("Move Forward") || a.ActionDescription.Equals("Move Back") || a.ActionDescription.Equals("Move Left") || a.ActionDescription.Equals("Move Right")) { AddAxisChange(a.Controller, UserActionType.MovementAxisChange); } } AddAxisChange(MouseXAxis, UserActionType.LookAxisChange); AddAxisChange(MouseYAxis, UserActionType.LookAxisChange); }
public override List <ActionSetting> GenerateDefaultActionSettings() { MouseXAxis = InputControlType.RightStickX; MouseYAxis = InputControlType.RightStickY; List <ActionSetting> actionSettings = new List <ActionSetting> (); ActionSetting aSetting = null; aSetting = ActionSetting.Analog; aSetting.ActionDescription = "Controller Mouse U / D"; aSetting.Controller = MouseYAxis; aSetting.AvailableControllerButtons = DefaultAvailableAxis; aSetting.Axis = ActionSetting.InputAxis.MouseY; aSetting.Mouse = ActionSetting.MouseAction.AxisY; actionSettings.Add(aSetting); aSetting = ActionSetting.Analog; aSetting.ActionDescription = "Controller Mouse L / R"; aSetting.Controller = MouseXAxis; aSetting.AvailableControllerButtons = DefaultAvailableAxis; aSetting.Axis = ActionSetting.InputAxis.MouseX; aSetting.Mouse = ActionSetting.MouseAction.AxisX; actionSettings.Add(aSetting); aSetting = ActionSetting.Button; aSetting.ActionDescription = "Move Forward"; aSetting.Controller = InputControlType.LeftStickUp; aSetting.Key = KeyCode.W; aSetting.Axis = ActionSetting.InputAxis.MoveForward; aSetting.AvailableControllerButtons = DefaultAvailableActions; aSetting.AvailableKeys = DefaultAvailableKeys; aSetting.AvailableMouseButtons = DefaultAvailableMouseButtons; actionSettings.Add(aSetting); aSetting = ActionSetting.Button; aSetting.ActionDescription = "Move Back"; aSetting.Controller = InputControlType.LeftStickDown; aSetting.Key = KeyCode.S; aSetting.Axis = ActionSetting.InputAxis.MoveBack; aSetting.AvailableControllerButtons = DefaultAvailableActions; aSetting.AvailableKeys = DefaultAvailableKeys; aSetting.AvailableMouseButtons = DefaultAvailableMouseButtons; actionSettings.Add(aSetting); aSetting = ActionSetting.Button; aSetting.ActionDescription = "Move Left"; aSetting.Controller = InputControlType.LeftStickLeft; aSetting.Key = KeyCode.A; aSetting.Axis = ActionSetting.InputAxis.MoveLeft; aSetting.AvailableControllerButtons = DefaultAvailableActions; aSetting.AvailableKeys = DefaultAvailableKeys; aSetting.AvailableMouseButtons = DefaultAvailableMouseButtons; actionSettings.Add(aSetting); aSetting = ActionSetting.Button; aSetting.ActionDescription = "Move Right"; aSetting.Controller = InputControlType.LeftStickRight; aSetting.Key = KeyCode.D; aSetting.Axis = ActionSetting.InputAxis.MoveRight; aSetting.AvailableControllerButtons = DefaultAvailableActions; aSetting.AvailableKeys = DefaultAvailableKeys; aSetting.AvailableMouseButtons = DefaultAvailableMouseButtons; actionSettings.Add(aSetting); aSetting = ActionSetting.Button; aSetting.Action = (int)UserActionType.MoveSprint; aSetting.ActionDescription = Data.GameData.AddSpacesToSentence(UserActionType.MoveSprint.ToString()); aSetting.Controller = InputControlType.LeftTrigger; aSetting.Key = KeyCode.LeftShift; aSetting.AvailableControllerButtons = DefaultAvailableActions; aSetting.AvailableKeys = DefaultAvailableKeys; aSetting.AvailableMouseButtons = DefaultAvailableMouseButtons; actionSettings.Add(aSetting); aSetting = ActionSetting.Button; aSetting.Action = (int)UserActionType.MoveJump; aSetting.ActionDescription = Data.GameData.AddSpacesToSentence(UserActionType.MoveJump.ToString()); aSetting.Controller = InputControlType.RightStickButton; aSetting.Key = KeyCode.Space; aSetting.AvailableControllerButtons = DefaultAvailableActions; aSetting.AvailableKeys = DefaultAvailableKeys; aSetting.AvailableMouseButtons = DefaultAvailableMouseButtons; actionSettings.Add(aSetting); aSetting = ActionSetting.Button; aSetting.Action = (int)UserActionType.MoveCrouch; aSetting.ActionDescription = Data.GameData.AddSpacesToSentence(UserActionType.MoveCrouch.ToString()); aSetting.Controller = InputControlType.LeftStickButton; aSetting.Key = KeyCode.C; aSetting.AvailableControllerButtons = DefaultAvailableActions; aSetting.AvailableKeys = DefaultAvailableKeys; aSetting.AvailableMouseButtons = DefaultAvailableMouseButtons; actionSettings.Add(aSetting); aSetting = ActionSetting.Button; aSetting.Action = (int)UserActionType.ItemUse; aSetting.ActionDescription = Data.GameData.AddSpacesToSentence(UserActionType.ItemUse.ToString()); aSetting.Controller = InputControlType.Action1; aSetting.Key = KeyCode.E; aSetting.AvailableControllerButtons = DefaultAvailableActions; aSetting.AvailableKeys = DefaultAvailableKeys; aSetting.AvailableMouseButtons = DefaultAvailableMouseButtons; actionSettings.Add(aSetting); aSetting = ActionSetting.Button; aSetting.Action = (int)UserActionType.ItemInteract; aSetting.ActionDescription = Data.GameData.AddSpacesToSentence(UserActionType.ItemInteract.ToString()); aSetting.Controller = InputControlType.Action2; aSetting.Mouse = ActionSetting.MouseAction.Right; aSetting.AvailableControllerButtons = DefaultAvailableActions; aSetting.AvailableKeys = DefaultAvailableKeys; aSetting.AvailableMouseButtons = DefaultAvailableMouseButtons; //aSetting.Cursor = ActionSetting.CursorAction.RightClick; actionSettings.Add(aSetting); aSetting = ActionSetting.Button; aSetting.Action = (int)UserActionType.ItemPlace; aSetting.ActionDescription = Data.GameData.AddSpacesToSentence(UserActionType.ItemPlace.ToString()); aSetting.Controller = InputControlType.Action3; aSetting.Key = KeyCode.F; aSetting.AvailableControllerButtons = DefaultAvailableActions; aSetting.AvailableKeys = DefaultAvailableKeys; aSetting.AvailableMouseButtons = DefaultAvailableMouseButtons; actionSettings.Add(aSetting); aSetting = ActionSetting.Button; aSetting.Action = (int)UserActionType.ActionCancel; aSetting.ActionDescription = Data.GameData.AddSpacesToSentence(UserActionType.ActionCancel.ToString()); aSetting.Controller = InputControlType.Action4; aSetting.Key = KeyCode.Escape; aSetting.AvailableControllerButtons = DefaultAvailableActions; aSetting.AvailableKeys = DefaultAvailableKeys; aSetting.AvailableMouseButtons = DefaultAvailableMouseButtons; actionSettings.Add(aSetting); aSetting = ActionSetting.Button; aSetting.Action = (int)UserActionType.ItemThrow; aSetting.ActionDescription = Data.GameData.AddSpacesToSentence(UserActionType.ItemThrow.ToString()); aSetting.Controller = InputControlType.RightTrigger; aSetting.Key = KeyCode.G; aSetting.AvailableControllerButtons = DefaultAvailableActions; aSetting.AvailableKeys = DefaultAvailableKeys; aSetting.AvailableMouseButtons = DefaultAvailableMouseButtons; actionSettings.Add(aSetting); aSetting = ActionSetting.Button; aSetting.Action = (int)UserActionType.ToolUse; aSetting.ActionOnHold = (int)UserActionType.ToolUseHold; aSetting.ActionOnRelease = (int)UserActionType.ToolUseRelease; aSetting.ActionDescription = Data.GameData.AddSpacesToSentence(UserActionType.ToolUse.ToString()); aSetting.Controller = InputControlType.RightBumper; aSetting.Mouse = ActionSetting.MouseAction.Left; aSetting.AvailableControllerButtons = DefaultAvailableActions; aSetting.AvailableKeys = DefaultAvailableKeys; aSetting.AvailableMouseButtons = DefaultAvailableMouseButtons; //aSetting.Cursor = ActionSetting.CursorAction.Click; actionSettings.Add(aSetting); aSetting = ActionSetting.Button; aSetting.Action = (int)UserActionType.ToolCyclePrev; aSetting.ActionDescription = Data.GameData.AddSpacesToSentence(UserActionType.ToolCyclePrev.ToString()); aSetting.Controller = InputControlType.LeftBumper; aSetting.Key = KeyCode.R; aSetting.AvailableControllerButtons = DefaultAvailableActions; aSetting.AvailableKeys = DefaultAvailableKeys; aSetting.AvailableMouseButtons = DefaultAvailableMouseButtons; actionSettings.Add(aSetting); aSetting = ActionSetting.Button; aSetting.Action = (int)UserActionType.ToolCycleNext; aSetting.ActionDescription = Data.GameData.AddSpacesToSentence(UserActionType.ToolCycleNext.ToString()); aSetting.Controller = InputControlType.Button10; aSetting.Key = KeyCode.T; aSetting.AvailableControllerButtons = DefaultAvailableActions; aSetting.AvailableKeys = DefaultAvailableKeys; aSetting.AvailableMouseButtons = DefaultAvailableMouseButtons; actionSettings.Add(aSetting); aSetting = ActionSetting.Button; aSetting.Action = (int)UserActionType.ToolHolster; aSetting.Controller = InputControlType.Menu; aSetting.ActionDescription = Data.GameData.AddSpacesToSentence(UserActionType.ToolHolster.ToString()); aSetting.Key = KeyCode.Q; aSetting.AvailableControllerButtons = DefaultAvailableActions; aSetting.AvailableKeys = DefaultAvailableKeys; aSetting.AvailableMouseButtons = DefaultAvailableMouseButtons; actionSettings.Add(aSetting); aSetting = ActionSetting.Button; aSetting.Action = (int)UserActionType.CameraSetForward; aSetting.Controller = InputControlType.Back; aSetting.ActionDescription = Data.GameData.AddSpacesToSentence("Camera Forward(VR)"); aSetting.Key = KeyCode.LeftAlt; aSetting.AvailableControllerButtons = DefaultAvailableActions; aSetting.AvailableKeys = DefaultAvailableKeys; aSetting.AvailableMouseButtons = DefaultAvailableMouseButtons; actionSettings.Add(aSetting); return(actionSettings); }
public override List <ActionSetting> GenerateDefaultActionSettings() { MouseXAxis = InputControlType.RightStickX; MouseYAxis = InputControlType.RightStickY; ScrollWheelAxis = InputControlType.DPadX; List <ActionSetting> actionSettings = new List <ActionSetting> (); ActionSetting aSetting = null; aSetting = ActionSetting.Analog; aSetting.ActionDescription = "Interface Mouse Y"; aSetting.Controller = MouseYAxis; aSetting.AvailableControllerButtons = DefaultAvailableAxis; aSetting.Axis = ActionSetting.InputAxis.MouseY; actionSettings.Add(aSetting); aSetting = ActionSetting.Analog; aSetting.ActionDescription = "Interface Mouse X"; aSetting.Controller = MouseXAxis; aSetting.AvailableControllerButtons = DefaultAvailableAxis; aSetting.Axis = ActionSetting.InputAxis.MouseX; actionSettings.Add(aSetting); aSetting = ActionSetting.Analog; aSetting.ActionDescription = "Selection L / R"; aSetting.ActionOnX = (int)InterfaceActionType.SelectionNext; aSetting.ActionOnY = (int)InterfaceActionType.SelectionPrev; aSetting.Controller = ScrollWheelAxis; aSetting.KeyX = KeyCode.RightBracket; aSetting.KeyY = KeyCode.LeftBracket; aSetting.AvailableControllerButtons = DefaultAvailableAxis; aSetting.AvailableKeys = DefaultAvailableKeys; aSetting.Mouse = ActionSetting.MouseAction.Wheel; //read-only aSetting.Axis = ActionSetting.InputAxis.ScrollWheel; actionSettings.Add(aSetting); aSetting = ActionSetting.Analog; aSetting.ActionDescription = "Button Left"; aSetting.Action = (int)InterfaceActionType.SelectionLeft; aSetting.Controller = InputControlType.LeftStickLeft; aSetting.Key = KeyCode.LeftArrow; aSetting.Axis = ActionSetting.InputAxis.InterfaceLeft; aSetting.AvailableControllerButtons = DefaultAvailableActions; aSetting.AvailableKeys = DefaultAvailableKeys; aSetting.OpposingActions = new int [] { (int)InterfaceActionType.SelectionDown, (int)InterfaceActionType.SelectionUp, (int)InterfaceActionType.SelectionRight, }; actionSettings.Add(aSetting); aSetting = ActionSetting.Analog; aSetting.ActionDescription = "Button Right"; aSetting.Action = (int)InterfaceActionType.SelectionRight; aSetting.Controller = InputControlType.LeftStickRight; aSetting.Key = KeyCode.RightArrow; aSetting.Axis = ActionSetting.InputAxis.InterfaceRight; aSetting.AvailableControllerButtons = DefaultAvailableActions; aSetting.AvailableKeys = DefaultAvailableKeys; aSetting.OpposingActions = new int [] { (int)InterfaceActionType.SelectionDown, (int)InterfaceActionType.SelectionLeft, (int)InterfaceActionType.SelectionUp, }; actionSettings.Add(aSetting); aSetting = ActionSetting.Analog; aSetting.ActionDescription = "Button Up"; aSetting.Action = (int)InterfaceActionType.SelectionUp; aSetting.Controller = InputControlType.LeftStickUp; aSetting.Key = KeyCode.UpArrow; aSetting.Axis = ActionSetting.InputAxis.InterfaceUp; aSetting.AvailableControllerButtons = DefaultAvailableActions; aSetting.AvailableKeys = DefaultAvailableKeys; aSetting.OpposingActions = new int [] { (int)InterfaceActionType.SelectionDown, (int)InterfaceActionType.SelectionLeft, (int)InterfaceActionType.SelectionRight, }; actionSettings.Add(aSetting); aSetting = ActionSetting.Analog; aSetting.ActionDescription = "Button Down"; aSetting.Action = (int)InterfaceActionType.SelectionDown; aSetting.Controller = InputControlType.LeftStickDown; aSetting.Key = KeyCode.DownArrow; aSetting.Axis = ActionSetting.InputAxis.InterfaceDown; aSetting.AvailableControllerButtons = DefaultAvailableActions; aSetting.AvailableKeys = DefaultAvailableKeys; aSetting.OpposingActions = new int [] { (int)InterfaceActionType.SelectionUp, (int)InterfaceActionType.SelectionLeft, (int)InterfaceActionType.SelectionRight, }; actionSettings.Add(aSetting); aSetting = ActionSetting.Button; aSetting.Action = (int)InterfaceActionType.ToggleInventory; aSetting.ActionDescription = Data.GameData.AddSpacesToSentence(InterfaceActionType.ToggleInventory.ToString()); aSetting.Controller = InputControlType.Button3; aSetting.Key = KeyCode.Tab; aSetting.AvailableControllerButtons = DefaultAvailableActions; aSetting.AvailableKeys = DefaultAvailableKeys; aSetting.AvailableMouseButtons = DefaultAvailableMouseButtons; actionSettings.Add(aSetting); aSetting = ActionSetting.Button; aSetting.Action = (int)InterfaceActionType.ToggleLog; aSetting.ActionDescription = Data.GameData.AddSpacesToSentence(InterfaceActionType.ToggleLog.ToString()); aSetting.Controller = InputControlType.Button2; aSetting.Key = KeyCode.L; aSetting.AvailableControllerButtons = DefaultAvailableActions; aSetting.AvailableKeys = DefaultAvailableKeys; aSetting.AvailableMouseButtons = DefaultAvailableMouseButtons; actionSettings.Add(aSetting); aSetting = ActionSetting.Button; aSetting.Action = (int)InterfaceActionType.ToggleMap; aSetting.ActionDescription = Data.GameData.AddSpacesToSentence(InterfaceActionType.ToggleMap.ToString()); aSetting.Controller = InputControlType.Button1; aSetting.Key = KeyCode.M; aSetting.AvailableControllerButtons = DefaultAvailableActions; aSetting.AvailableKeys = DefaultAvailableKeys; aSetting.AvailableMouseButtons = DefaultAvailableMouseButtons; actionSettings.Add(aSetting); aSetting = ActionSetting.Button; aSetting.Action = (int)InterfaceActionType.ToggleInterfaceNext; aSetting.ActionDescription = Data.GameData.AddSpacesToSentence(InterfaceActionType.ToggleInterfaceNext.ToString()); aSetting.Controller = InputControlType.Start; aSetting.AvailableControllerButtons = DefaultAvailableActions; aSetting.AvailableKeys = DefaultAvailableKeys; aSetting.AvailableMouseButtons = DefaultAvailableMouseButtons; actionSettings.Add(aSetting); aSetting = ActionSetting.Analog; aSetting.Action = (int)InterfaceActionType.CursorClick; aSetting.ActionDescription = Data.GameData.AddSpacesToSentence(InterfaceActionType.CursorClick.ToString()); aSetting.Controller = InputControlType.Action1; aSetting.Mouse = ActionSetting.MouseAction.Left; aSetting.AvailableControllerButtons = DefaultAvailableActions; aSetting.AvailableMouseButtons = DefaultAvailableMouseButtons; aSetting.AvailableKeys = DefaultAvailableKeys; aSetting.Key = KeyCode.Return; aSetting.Cursor = ActionSetting.CursorAction.Click; actionSettings.Add(aSetting); aSetting = ActionSetting.Analog; aSetting.Action = (int)InterfaceActionType.CursorRightClick; aSetting.ActionDescription = Data.GameData.AddSpacesToSentence(InterfaceActionType.CursorRightClick.ToString()); aSetting.Controller = InputControlType.Action2; aSetting.Mouse = ActionSetting.MouseAction.Right; aSetting.AvailableControllerButtons = DefaultAvailableActions; aSetting.AvailableMouseButtons = DefaultAvailableMouseButtons; aSetting.AvailableKeys = DefaultAvailableKeys; aSetting.Key = KeyCode.Quote; aSetting.Cursor = ActionSetting.CursorAction.RightClick; actionSettings.Add(aSetting); aSetting = ActionSetting.Button; aSetting.Action = (int)InterfaceActionType.InterfaceHide; aSetting.ActionDescription = Data.GameData.AddSpacesToSentence(InterfaceActionType.InterfaceHide.ToString()); aSetting.Controller = InputControlType.Button10; aSetting.Key = KeyCode.F2; aSetting.AvailableControllerButtons = DefaultAvailableActions; aSetting.AvailableMouseButtons = DefaultAvailableMouseButtons; aSetting.AvailableKeys = DefaultAvailableKeys; actionSettings.Add(aSetting); aSetting = ActionSetting.Button; aSetting.Action = (int)InterfaceActionType.StackSplit; aSetting.ActionDescription = Data.GameData.AddSpacesToSentence(InterfaceActionType.StackSplit.ToString()); aSetting.Controller = InputControlType.RightTrigger; aSetting.Key = KeyCode.LeftControl; aSetting.AvailableControllerButtons = DefaultAvailableActions; aSetting.AvailableKeys = DefaultAvailableKeys; actionSettings.Add(aSetting); return(actionSettings); }