示例#1
0
    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);
        }
    }
示例#2
0
    public void OnMenu(InputAction.CallbackContext context)
    {
        ScrollViewEntry TempEntry = Instantiate(InputEntryPrefab, EntrySpawn);

        TempEntry.SetEntryText("Menu " + context.control.path);
        TempEntry.transform.SetSiblingIndex(0);
        Entries.Add(TempEntry);
    }
示例#3
0
    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);
    }
示例#4
0
    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);
    }
示例#5
0
 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);
 }
示例#6
0
 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);
     }
 }