@@ -139,7 +139,7 @@ width=60
139139
140140This can be handled in the ` start_menu.gd ` script programmatically:
141141
142- ``` python
142+ ``` gd
143143## Handles the press event for the start button. Navigates to intro cutscene.
144144func _on_start_button_pressed() -> void:
145145 theme_player.stop()
@@ -182,7 +182,7 @@ character can collide with the world.
182182
183183When we create a script for the scene, it will follow this format:
184184
185- ``` python
185+ ``` gd
186186extends CharacterBody2D
187187
188188## any signals, state variables, and onready references
@@ -205,7 +205,7 @@ func _physics_process(_delta: float) -> void:
205205Filling in more implementation, our final ` player.gd ` can be boiled down to
206206this:
207207
208- ``` python
208+ ``` gd
209209extends CharacterBody2D
210210
211211@onready var _animated_sprite = $AnimatedSprite2D
@@ -292,7 +292,7 @@ The `boid.gd` script implements these behaviors for enemy or NPC characters,
292292with additional features like wall avoidance and attacking. Below are key
293293snippets capturing the essence of the flocking logic:
294294
295- ``` python
295+ ``` gd
296296extends CharacterBody2D
297297
298298@export var max_speed: float = 125.0
@@ -455,7 +455,7 @@ dynamic. The player can hide behind walls to temporarily escape the boids' line
455455sight, but the player has to now fend off the boids while trying to solve
456456puzzles.
457457
458- ``` python
458+ ``` gd
459459## Returns the closest target node within the boid's view radius.
460460## @returns Node2D - The closest target node within the boid's view radius.
461461func _get_closest_target() -> Node2D:
0 commit comments