Set keybinds of player 1 and 2
hackyyyy
This commit is contained in:
parent
c470d84e2a
commit
4b39ff06cc
@ -33,6 +33,17 @@ func _ready():
|
|||||||
_rayCast = get_node(rayCastPath) as RayCast
|
_rayCast = get_node(rayCastPath) as RayCast
|
||||||
_viewport = get_node(viewPortPath) as Viewport
|
_viewport = get_node(viewPortPath) as Viewport
|
||||||
_playerNum = get_node(playerNumPath) as Label
|
_playerNum = get_node(playerNumPath) as Label
|
||||||
|
|
||||||
|
# Keybinds of first player
|
||||||
|
_torso.get_node("DownFrontLeft").key = KEY_D
|
||||||
|
_torso.get_node("DownFrontRight").key = KEY_F
|
||||||
|
_torso.get_node("DownBackLeft").key = KEY_A
|
||||||
|
_torso.get_node("DownBackRight").key = KEY_S
|
||||||
|
|
||||||
|
_torso.get_node("UpFrontLeft").key = KEY_E
|
||||||
|
_torso.get_node("UpFrontRight").key = KEY_R
|
||||||
|
_torso.get_node("UpBackLeft").key = KEY_W
|
||||||
|
_torso.get_node("UpBackRight").key = KEY_Q
|
||||||
|
|
||||||
|
|
||||||
func change_count_ui():
|
func change_count_ui():
|
||||||
@ -40,6 +51,19 @@ func change_count_ui():
|
|||||||
print("test")
|
print("test")
|
||||||
done_player_count = 0
|
done_player_count = 0
|
||||||
_playerNum.text = str(done_player_count + 1) + "/" + str(InGameState.player_count)
|
_playerNum.text = str(done_player_count + 1) + "/" + str(InGameState.player_count)
|
||||||
|
|
||||||
|
# TODO: Move somewhere else because it's not UI!
|
||||||
|
if done_player_count == 1:
|
||||||
|
# Keybinds of second player
|
||||||
|
_torso.get_node("DownFrontLeft").key = KEY_H
|
||||||
|
_torso.get_node("DownFrontRight").key = KEY_J
|
||||||
|
_torso.get_node("DownBackLeft").key = KEY_K
|
||||||
|
_torso.get_node("DownBackRight").key = KEY_L
|
||||||
|
|
||||||
|
_torso.get_node("UpFrontLeft").key = KEY_Z
|
||||||
|
_torso.get_node("UpFrontRight").key = KEY_U
|
||||||
|
_torso.get_node("UpBackLeft").key = KEY_I
|
||||||
|
_torso.get_node("UpBackRight").key = KEY_O
|
||||||
|
|
||||||
|
|
||||||
func _process(delta):
|
func _process(delta):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user