wild jam prototype

This commit is contained in:
2024-02-24 08:35:47 -06:00
parent e6d1f5a8df
commit bd0e9e21cd
28 changed files with 606 additions and 19 deletions

View File

@@ -5,8 +5,13 @@ class_name Enemy
@onready var nav_agent: NavigationAgent2D = $NavigationAgent2D
var vision: int = 100
var at_rocket := false
func _physics_process(delta: float) -> void:
if not at_rocket:
random_movement()
func random_movement():
if nav_agent.is_navigation_finished():
call_deferred("new_target_point")
return
@@ -26,7 +31,7 @@ func _physics_process(delta: float) -> void:
lives += 1
color.r -= 0.25
buff.colors.GREEN:
#$Camera2D.zoom -= Vector2(0.4, 0.4)
vision += 25
color.g -= 0.25
buff.colors.BLUE:
speed += 12
@@ -48,3 +53,6 @@ func new_target_point():
#point_delta = point_delta.normalized()
#closest_point += point_delta * 32
nav_agent.target_position = closest_point
func reach_rocket():
at_rocket = true