|
@@ -2,10 +2,10 @@ extends Area2D
|
|
|
|
|
|
# Nodes
|
|
|
var grid:TileMap
|
|
|
-var tween
|
|
|
-var rayFront
|
|
|
-var rayLeft
|
|
|
-var rayRight
|
|
|
+onready var tween = $Tween
|
|
|
+onready var rayFront = $RayFront
|
|
|
+onready var rayLeft = $RayLeft
|
|
|
+onready var rayRight = $RayRight
|
|
|
|
|
|
# Misc
|
|
|
var cell_size
|
|
@@ -51,13 +51,8 @@ func _ready():
|
|
|
|
|
|
turn(dire)
|
|
|
|
|
|
- tween = $Tween
|
|
|
tween.connect_into(self)
|
|
|
|
|
|
- rayFront = $RayFront
|
|
|
- rayLeft = $RayLeft
|
|
|
- rayRight = $RayRight
|
|
|
-
|
|
|
func _physics_process(delta):
|
|
|
# TODO : use action callbacks
|
|
|
if Input.is_action_just_pressed(turn_left_action):
|