File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ extends Node2D
2
2
3
3
var tmap : TileMap
4
4
var lbl : Label
5
- const STEP_SIZE = 5 # pixels
5
+ const STEP_SIZE = 50 # pixels
6
6
7
7
# Called when the node enters the scene tree for the first time.
8
8
func _ready ():
@@ -23,13 +23,13 @@ func _on_screen_resized():
23
23
# Called every frame. 'delta' is the elapsed time since the previous frame.
24
24
func _process (delta ):
25
25
if Input .is_action_pressed ('ui_left' ):
26
- tmap .position .x -= STEP_SIZE
26
+ tmap .position .x -= STEP_SIZE * delta
27
27
if Input .is_action_pressed ('ui_right' ):
28
- tmap .position .x += STEP_SIZE
28
+ tmap .position .x += STEP_SIZE * delta
29
29
if Input .is_action_pressed ('ui_up' ):
30
- tmap .position .y -= STEP_SIZE
30
+ tmap .position .y -= STEP_SIZE * delta
31
31
if Input .is_action_pressed ('ui_down' ):
32
- tmap .position .y += STEP_SIZE
32
+ tmap .position .y += STEP_SIZE * delta
33
33
34
34
func _input (event ):
35
35
if event .is_action_pressed ("ui_cancel" ):
You can’t perform that action at this time.
0 commit comments