Skip to content

Commit 88a6d2f

Browse files
committed
Add C# Tips to 3d tutorial game
1 parent 971c1f7 commit 88a6d2f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

getting_started/first_3d_game/06.jump_and_squash.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,8 @@ With this code, if no collisions occurred on a given frame, the loop won't run.
269269
KinematicCollision3D collision = GetSlideCollision(index);
270270

271271
// If the collision is with a mob.
272+
// With C# we leverage typing and pattern-matching
273+
// instead of checking for the group we created.
272274
if (collision.GetCollider() is Mob mob)
273275
{
274276
// We check that we are hitting it from above.
@@ -344,6 +346,10 @@ destroy the mob.
344346
QueueFree();
345347
}
346348

349+
.. note::
350+
351+
When using C#, Godot will create the appropriate events automatically for all Signals ending with `EventHandler`, see :ref:`C# Signals <doc_c_sharp_signals>`.
352+
347353
We will use the signal to add points to the score in the next lesson.
348354

349355
With that, you should be able to kill monsters by jumping on them. You can press

0 commit comments

Comments
 (0)