temporary commit
This commit is contained in:
parent
237677c413
commit
8b13162d9e
3 changed files with 20 additions and 21 deletions
|
@ -1,20 +1,18 @@
|
|||
extends Node2D
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
pass # Replace with function body.
|
||||
var _player: Player = null
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
pass
|
||||
func _physics_process(delta: float) -> void:
|
||||
_player.state_chart.send_event(&"touched_ice")
|
||||
|
||||
|
||||
func _on_area_2d_body_entered(body: Node2D) -> void:
|
||||
func _on_player_detector_body_entered(body: Node2D) -> void:
|
||||
if body is Player:
|
||||
pass
|
||||
_player = body
|
||||
|
||||
|
||||
func _on_area_2d_body_exited(body: Node2D) -> void:
|
||||
pass
|
||||
func _on_player_detector_body_exited(body: Node2D) -> void:
|
||||
if body == _player:
|
||||
_player = null
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue