ft: drag to move

This commit is contained in:
2026-03-15 16:51:01 +01:00
parent 6239bbdd73
commit c20985ac91
5 changed files with 10 additions and 20 deletions

View File

@@ -42,9 +42,3 @@ func become_injured() -> void:
func _on_sight_body_entered(body: Node2D) -> void:
if body.is_in_group("predator") or (health < maxHealth and body.is_in_group("player")):
fsm.transition_to_next_state(fsm.States.FLEEING, {"threat": body})
func _on_collision_input_event(viewport: Node, event: InputEvent, shape_idx: int) -> void:
if event is InputEventMouseButton and event.button_index == MOUSE_BUTTON_LEFT and event.pressed:
if player:
player.target = self.collision