cooking again
This commit is contained in:
parent
b0b210a8be
commit
dafae35985
14 changed files with 218 additions and 10 deletions
10
braincell.gd
10
braincell.gd
|
|
@ -5,6 +5,8 @@ const SPEED = 170.0
|
|||
const JUMP_VELOCITY = -400.0
|
||||
var ready_to_door : bool = true
|
||||
@export var doorBox : Area2D
|
||||
@export var hand : Node2D
|
||||
var holding_apple : bool = false
|
||||
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
|
|
@ -29,6 +31,8 @@ func _physics_process(delta: float) -> void:
|
|||
|
||||
if !doorBox.has_overlapping_areas():
|
||||
ready_to_door = true
|
||||
|
||||
hand.visible = holding_apple
|
||||
|
||||
|
||||
func _on_door_box_area_entered(area: Area2D) -> void:
|
||||
|
|
@ -48,3 +52,9 @@ func _on_door_box_area_entered(area: Area2D) -> void:
|
|||
ready_to_door = false
|
||||
#Router.activate_seg.emit(Router.cur_id - 1)
|
||||
# -1 seg
|
||||
|
||||
func grab():
|
||||
holding_apple = true
|
||||
|
||||
func drop():
|
||||
holding_apple = false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue