add child node assertions to units
This commit is contained in:
@@ -9,6 +9,9 @@ var ground_plane: Plane = Plane(Vector3.UP, 0)
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
assert(camera != null, "camera missing!")
|
||||
assert(selection_sprite != null, "selection_sprite missing!")
|
||||
|
||||
set_selected(false)
|
||||
super._ready()
|
||||
|
||||
|
||||
@@ -16,6 +16,11 @@ var is_on_screen: bool = false
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
assert(hover_sprite != null, "hover_sprite missing!")
|
||||
assert(nav_agent != null, "nav_agent missing!")
|
||||
assert(animation_player != null, "animation_player missing!")
|
||||
assert(visibility_notifier != null, "visibility_notifier missing!")
|
||||
|
||||
set_hovered(false)
|
||||
nav_agent.max_speed = MOVE_SPEED
|
||||
nav_agent.velocity_computed.connect(_on_nav_agent_velocity_computed)
|
||||
|
||||
Reference in New Issue
Block a user