Set keybinds of player 1 and 2
hackyyyy
This commit is contained in:
parent
c470d84e2a
commit
4b39ff06cc
@ -34,6 +34,17 @@ func _ready():
|
||||
_viewport = get_node(viewPortPath) as Viewport
|
||||
_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():
|
||||
if done_player_count == null:
|
||||
@ -41,6 +52,19 @@ func change_count_ui():
|
||||
done_player_count = 0
|
||||
_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):
|
||||
# TODO: Would be nicer to just disable gravity, but then it can't be re-enabled...
|
||||
|
Loading…
x
Reference in New Issue
Block a user