Started a player system and got input handling working

This commit is contained in:
Gnarwhal 2024-08-07 05:08:12 +00:00
parent a6bdaace98
commit d171be23d9
Signed by: Gnarwhal
GPG key ID: 0989A73D8C421174
15 changed files with 396 additions and 21 deletions

34
resources/bindings.ron Normal file
View file

@ -0,0 +1,34 @@
(
// YES! I KNOW THIS IS A BAD WAY TO SUPPORT CONTROLLERS!
// --- The Unnecessary Defense ---
// I'm new to the engine and it's a almost half way through a game jam and I have a black window to show for it, so please(!) give me a break 🥺?
axes: {
Horizontal(-1): Emulated(pos: ScanCode(32), neg: ScanCode(30)),
Horizontal( 0): Controller(controller_id: 0, axis: LeftX, invert: false, dead_zone: 0.1),
Horizontal( 1): Controller(controller_id: 1, axis: LeftX, invert: false, dead_zone: 0.1),
Horizontal( 2): Controller(controller_id: 2, axis: LeftX, invert: false, dead_zone: 0.1),
Horizontal( 3): Controller(controller_id: 3, axis: LeftX, invert: false, dead_zone: 0.1),
Horizontal( 4): Controller(controller_id: 4, axis: LeftX, invert: false, dead_zone: 0.1),
Horizontal( 5): Controller(controller_id: 5, axis: LeftX, invert: false, dead_zone: 0.1),
},
actions: {
ShortHop: [
[Controller(0, X)],
[Controller(1, X)],
[Controller(2, X)],
[Controller(3, X)],
[Controller(4, X)],
[Controller(5, X)],
],
FullHop: [
[ScanCode(17)],
[ScanCode(57)],
[Controller(0, A)],
[Controller(1, A)],
[Controller(2, A)],
[Controller(3, A)],
[Controller(4, A)],
[Controller(5, A)],
],
}
)

View file

@ -0,0 +1,5 @@
(
title: "DJam 4",
resizable: true,
dimensions: Some((1280, 720)),
)

BIN
resources/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB