From f0d9a6ba1740a32df101ba22cd7f199adf251631 Mon Sep 17 00:00:00 2001 From: Erik Onarheim Date: Tue, 31 Dec 2024 16:13:56 -0600 Subject: [PATCH] docs: Add more clarification around Bird.stop() closes: #3323 --- site/docs/00-tutorial/03-step-bird-and-ground.mdx | 8 ++++++++ site/docs/00-tutorial/05-step-plumbing-pipes.mdx | 2 ++ 2 files changed, 10 insertions(+) diff --git a/site/docs/00-tutorial/03-step-bird-and-ground.mdx b/site/docs/00-tutorial/03-step-bird-and-ground.mdx index 7ed71e76b..6f17db2c2 100644 --- a/site/docs/00-tutorial/03-step-bird-and-ground.mdx +++ b/site/docs/00-tutorial/03-step-bird-and-ground.mdx @@ -51,6 +51,14 @@ export class Bird extends ex.Actor { override onInitialize(): void { this.acc = ex.vec(0, 1200); // pixels per second per second } + + start() { + // later we'll use this to start our bird after game over + } + + stop() { + // later we'll use this to stop our bird after collision + } } ``` diff --git a/site/docs/00-tutorial/05-step-plumbing-pipes.mdx b/site/docs/00-tutorial/05-step-plumbing-pipes.mdx index 386cb2a03..556bd8357 100644 --- a/site/docs/00-tutorial/05-step-plumbing-pipes.mdx +++ b/site/docs/00-tutorial/05-step-plumbing-pipes.mdx @@ -39,6 +39,8 @@ export class Pipe extends ex.Actor { To make the `Bird` "collide" with our pipes we need to adjust our `onCollisionStart` to account for `Pipe`. +We'll use the `stop()` method we created in step 3 to stop our bird from moving when we collide. + ```typescript // bird.ts import * as ex from 'excalibur';