public void OnProne(InputAction.CallbackContext context) { ScrollViewEntry TempEntry = Instantiate(InputEntryPrefab, EntrySpawn); TempEntry.SetEntryText("Prone " + context.control.path); TempEntry.transform.SetSiblingIndex(0); Entries.Add(TempEntry); if (context.control.path == "/Keyboard/c" || context.control.path == "/Keyboard/n") { TempEntry.SetEntryText("Held To Prone " + context.control.path); } else { TempEntry.SetEntryText("Prone " + context.control.path); } }
public void OnMenu(InputAction.CallbackContext context) { ScrollViewEntry TempEntry = Instantiate(InputEntryPrefab, EntrySpawn); TempEntry.SetEntryText("Menu " + context.control.path); TempEntry.transform.SetSiblingIndex(0); Entries.Add(TempEntry); }
public void OnToggleSwapLeftSubTrigger(InputAction.CallbackContext context) { ScrollViewEntry TempEntry = Instantiate(InputEntryPrefab, EntrySpawn); TempEntry.SetEntryText("Toggle Swap Left Sub " + context.control.path); TempEntry.transform.SetSiblingIndex(0); Entries.Add(TempEntry); }
public void OnSwapToMainTriggerSlot4(InputAction.CallbackContext context) { ScrollViewEntry TempEntry = Instantiate(InputEntryPrefab, EntrySpawn); TempEntry.SetEntryText("Swap to Main 4 " + context.control.path); TempEntry.transform.SetSiblingIndex(0); Entries.Add(TempEntry); }
public void OnMove(InputAction.CallbackContext context) { //Debug.Log("Move: " + MovementInput); MovementInput = context.ReadValue <Vector2>(); if (Entries.Count <= 0 || (Entries[Entries.Count - 1].EntryString != "Move " + context.control.path && MovementInput != Vector2.zero)) { ScrollViewEntry TempEntry = Instantiate(InputEntryPrefab, EntrySpawn); TempEntry.SetEntryText("Move " + context.control.path); TempEntry.transform.SetSiblingIndex(0); Entries.Add(TempEntry); } MovementJoystick.SetJoystickPosition(MovementInput); }
public void OnLook(InputAction.CallbackContext context) { //Debug.Log("Look: " + LookInput); LookInput = context.ReadValue <Vector2>(); if (Entries.Count <= 0 || (Entries[Entries.Count - 1].EntryString != "Look " + context.control.path && LookInput != Vector2.zero)) { ScrollViewEntry TempEntry = Instantiate(InputEntryPrefab, EntrySpawn); TempEntry.SetEntryText("Look " + context.control.path); TempEntry.transform.SetSiblingIndex(0); Entries.Add(TempEntry); } if (context.control.path == "/Mouse/delta") { LookJoystick.SetJoystickPosition(LookInput, true); } else { LookJoystick.SetJoystickPosition(LookInput); } }