Skip to content

Commit

Permalink
docs: Add more clarification around Bird.stop()
Browse files Browse the repository at this point in the history
closes: #3323
  • Loading branch information
eonarheim committed Dec 31, 2024
1 parent 28a9a18 commit f0d9a6b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions site/docs/00-tutorial/03-step-bird-and-ground.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
```

Expand Down
2 changes: 2 additions & 0 deletions site/docs/00-tutorial/05-step-plumbing-pipes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit f0d9a6b

Please sign in to comment.