finished belts. Some random errors in corners...
This commit is contained in:
@@ -17,17 +17,19 @@ func _process(delta: float) -> void:
|
||||
func setup(pos, dir):
|
||||
map_position = pos
|
||||
facing_direction = dir
|
||||
self.rotate(-PI / 2 * facing_direction)
|
||||
|
||||
func collect(input_value: int):
|
||||
$value_text.text = str(input_value)
|
||||
$value_text.show()
|
||||
empty = false
|
||||
value = input_value
|
||||
if empty:
|
||||
$value_text.text = str(input_value)
|
||||
$value_text.show()
|
||||
empty = false
|
||||
value = input_value
|
||||
|
||||
func move():
|
||||
#print("Moving item")
|
||||
move_timer += 1
|
||||
$value_text.position[1] = -30 + (move_timer * 2)
|
||||
$value_text.position[1] = -14 + (move_timer * 2)
|
||||
if move_timer > 15:
|
||||
move_timer = 0
|
||||
empty = true
|
||||
@@ -35,5 +37,11 @@ func move():
|
||||
var next_pos = map_position
|
||||
if facing_direction == 0:
|
||||
next_pos[1] += 1
|
||||
elif facing_direction == 1:
|
||||
next_pos[0] += 1
|
||||
elif facing_direction == 2:
|
||||
next_pos[1] -= 1
|
||||
elif facing_direction == 3:
|
||||
next_pos[0] -= 1
|
||||
return [next_pos, value]
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user