mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-06 07:50:22 +01:00
This leads to code that is easier to understand and runs faster thanks to GDScript's typed instructions. The untyped declaration warning is now enabled on all projects where type hints were added. All projects currently run without any untyped declration warnings. Dodge the Creeps and Squash the Creeps demos intentionally don't use type hints to match the documentation, where type hints haven't been adopted yet (given its beginner focus).
7 lines
142 B
GDScript
7 lines
142 B
GDScript
extends Area2D
|
|
|
|
func _on_wall_area_entered(area: Area2D) -> void:
|
|
if area.name == "Ball":
|
|
# Ball went out of bounds, reset.
|
|
area.reset()
|