Skip to content

Commit

Permalink
feat: rename inputs, so they work by default
Browse files Browse the repository at this point in the history
  • Loading branch information
GavrilovNI committed Mar 15, 2024
1 parent c19d992 commit 940e75a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
9 changes: 5 additions & 4 deletions .sbproj
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@
"GroupName": "Movement"
},
{
"Name": "Run",
"Name": "Run_",
"KeyboardCode": "CTRL",
"GroupName": "Movement"
},
{
"Name": "Duck",
"Name": "Crouch",
"KeyboardCode": "SHIFT",
"GroupName": "Movement"
},
Expand Down Expand Up @@ -163,7 +163,7 @@
"GroupName": "Other"
},
{
"Name": "Drop",
"Name": "Drop_",
"KeyboardCode": "q",
"GroupName": "Inventory"
},
Expand Down Expand Up @@ -197,7 +197,8 @@
"KeyboardCode": "SHIFT",
"GroupName": "Actions"
}
]
],
"__guid": "8bd7606b-16dd-4fc9-8ce0-8d0c97050ab7"
},
"StartupScene": "scenes/mainmenu.scene"
}
Expand Down
6 changes: 3 additions & 3 deletions code/Controlling/GameInput.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ public static class GameInput
{
public static Vector2 LookDelta => Input.MouseDelta * Preferences.Sensitivity;

public static bool IsCrouching => Input.Down("Duck");
public static bool IsRunning => Input.Down("Run");
public static bool IsCrouching => Input.Down("Crouch");
public static bool IsRunning => Input.Down("Run_");
public static bool IsJumpPressed => Input.Pressed("Jump");
public static bool IsHandSwapPressed => Input.Pressed("HandSwap");
public static bool IsDropPressed => Input.Pressed("Drop");
public static bool IsDropPressed => Input.Pressed("Drop_");

public static bool IsSlotPressed(int slotIndex) => Input.Pressed($"Slot{slotIndex + 1}");
public static bool IsSlotPrevPressed => Input.Pressed("SlotPrev");
Expand Down

0 comments on commit 940e75a

Please sign in to comment.