瀏覽代碼

Rename actions

Shorter is better.
DricomDragon 5 年之前
父節點
當前提交
01243e104e
共有 2 個文件被更改,包括 18 次插入8 次删除
  1. 4 4
      Game.gd
  2. 14 4
      project.godot

+ 4 - 4
Game.gd

@@ -54,16 +54,16 @@ func start():
 	# Player 1
 	player = playerScene.instance()
 	player.grid = levelCurrentNode
-	player.turn_left_action = "player_1_turn_left"
-	player.turn_right_action = "player_1_turn_right"
+	player.turn_left_action = "p1_left"
+	player.turn_right_action = "p1_right"
 	player.position = Vector2(4 * 64 + 32, 8 * 64 + 32)
 	add_child(player)
 
 	# Player 2
 	player = playerScene.instance()
 	player.grid = levelCurrentNode
-	player.turn_left_action = "player_2_turn_left"
-	player.turn_right_action = "player_2_turn_right"
+	player.turn_left_action = "p2_left"
+	player.turn_right_action = "p2_right"
 	player.position = Vector2(6 * 64 + 32, 8 * 64 + 32)
 	add_child(player)
 

+ 14 - 4
project.godot

@@ -29,26 +29,36 @@ ui_accept={
 , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":11,"pressure":0.0,"pressed":false,"script":null)
  ]
 }
-player_1_turn_right={
+p1_right={
 "deadzone": 0.5,
 "events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":85,"unicode":0,"echo":false,"script":null)
  ]
 }
-player_1_turn_left={
+p1_left={
 "deadzone": 0.5,
 "events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":79,"unicode":0,"echo":false,"script":null)
  ]
 }
-player_2_turn_left={
+p2_left={
 "deadzone": 0.5,
 "events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":72,"unicode":0,"echo":false,"script":null)
  ]
 }
-player_2_turn_right={
+p2_right={
 "deadzone": 0.5,
 "events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":78,"unicode":0,"echo":false,"script":null)
  ]
 }
+p3_left={
+"deadzone": 0.5,
+"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"unicode":0,"echo":false,"script":null)
+ ]
+}
+p3_right={
+"deadzone": 0.5,
+"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"unicode":0,"echo":false,"script":null)
+ ]
+}
 
 [rendering]