Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matching syntax to the code in the tutorial codebase repo #62

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion concepts/animation.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ now we need to take a look at our spritesheet and check which frames correspond
once we have that jotted down we can in setup method instantiate Spritesheet and AnimationAction

```go
func (*DefaultScene) Setup(w *ecs.World)) {
func (*myScene) Setup(u engo.Updater) {
world, _ := u.(*ecs.World)
game.AddSystem(&engo.RenderSystem{})
game.AddSystem(&engo.AnimationSystem{})

Expand Down
9 changes: 6 additions & 3 deletions tutorials/_posts/2016-04-10-first-system.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ the `Entity` we created in the last tutorial.
{% highlight go %}
// Setup is called before the main loop starts. It allows you
// to add entities and systems to your Scene.
func (*myScene) Setup(world *ecs.World) {
func (*myScene) Setup(u engo.Updater) {
world, _ := u.(*ecs.World)
common.SetBackground(color.White)
world.AddSystem(&common.RenderSystem{})

Expand Down Expand Up @@ -108,7 +109,8 @@ First, we need to tell the Engo to listen for the F1 key press. We'll do this by

Add the following line to the `Setup` function for your `Scene`.
{% highlight go %}
func (*myScene) Setup(world *ecs.World) {
func (*myScene) Setup(u engo.Updater) {
world, _ := u.(*ecs.World)
engo.Input.RegisterButton("AddCity", engo.KeyF1)
common.SetBackground(color.White)
world.AddSystem(&common.RenderSystem{})
Expand Down Expand Up @@ -214,7 +216,8 @@ The first thing you want to do, is add the `MouseSystem` to your `Scene`:

{% highlight go %}
// Setup is called before the main loop starts. It allows you to add entities and systems to your Scene.
func (*myGame) Setup(world *ecs.World) {
func (*myScene) Setup(u engo.Updater) {
world, _ := u.(*ecs.World)
engo.Input.RegisterButton("AddCity", engo.F1)
common.SetBackground(color.White)

Expand Down
3 changes: 2 additions & 1 deletion tutorials/_posts/2016-04-11-camera-movement.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ The `KeyboardScroller` is another System - one that listens for keyboard input a
Let's add one in the `Setup` function of our game:
{% highlight go %}
// Setup is called before the main loop starts. It allows you to add entities and systems to your Scene.
func (*myScene) Setup(world *ecs.World) {
func (*myScene) Setup(u engo.Updater) {
world, _ := u.(*ecs.World)
engo.SetBackground(color.White)

world.AddSystem(&engo.MouseSystem{})
Expand Down