Skip to content

Commit b10d77e

Browse files
authored
Merge pull request #35 from hypothete/master
fixed some typos / updates to engo that changed code
2 parents 02dd48e + 63df58c commit b10d77e

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

tutorials/_posts/2016-04-09-hello-world.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,16 @@ In order to add the `RenderSystem` to our `engo`-game, we want to add it within
143143
`RenderSystem` is located in the engo.io/engo/common package, along with other frequently used systems.
144144

145145
{% highlight go %}
146-
import "engo.io/engo/common"
146+
import (
147+
"engo.io/ecs"
148+
"engo.io/engo"
149+
"engo.io/engo/common"
150+
)
147151

148152
// Setup is called before the main loop starts. It allows you
149153
// to add entities and systems to your Scene.
150-
func (*myScene) Setup(world *ecs.World) {
154+
func (*myScene) Setup(u engo.Updater) {
155+
world, _ := u.(*ecs.World)
151156
world.AddSystem(&common.RenderSystem{})
152157
}
153158
{% endhighlight %}

tutorials/_posts/2016-04-10-first-system.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ func (*myScene) Setup(world *ecs.World) {
8686

8787
> ##### How do we know it works?
8888
> At the moment, we can't be sure it actually works, right?
89-
> Each system can optionally implement `New(*eces.World)`, which will be called whenever the System is added to the
89+
> Each system can optionally implement `New(*ecs.World)`, which will be called whenever the System is added to the
9090
> scene.
9191
>
9292
> Let's create a `New` function for our `CityBuildingSystem` like this:
@@ -109,7 +109,7 @@ First, we need to tell the Engo to listen for the F1 key press. We'll do this by
109109
Add the following line to the `Setup` function for your `Scene`.
110110
{% highlight go %}
111111
func (*myScene) Setup(world *ecs.World) {
112-
engo.Input.RegisterButton("AddCity", engo.F1)
112+
engo.Input.RegisterButton("AddCity", engo.KeyF1)
113113
common.SetBackground(color.White)
114114
world.AddSystem(&common.RenderSystem{})
115115

tutorials/_posts/2016-04-11-camera-movement.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func (*myScene) Setup(world *ecs.World) {
4444
world.AddSystem(&engo.RenderSystem{})
4545
kbs := common.NewKeyboardScroller(
4646
400, engo.DefaultHorizontalAxis,
47-
engo.DefaultVerticalAxis))
47+
engo.DefaultVerticalAxis)
4848
world.AddSystem(kbs)
4949

5050
world.AddSystem(&systems.CityBuildingSystem{})
@@ -83,8 +83,8 @@ It uses the same scroll-speed as the KeyboardScroller (`400`) in this case. The
8383
of pixels the cursor has to be near the edge of the screen in order to count as being "near the edge". The higher the
8484
number, the sooner this system will decide to move the camera around.
8585

86-
#### ScrollZoomer
87-
As with the other two, the `ScrollZoomer` is a `System` we can add to our game.
86+
#### MouseZoomer
87+
As with the other two, the `MouseZoomer` is a `System` we can add to our game.
8888

8989
{% highlight go %}
9090
world.AddSystem(&common.MouseZoomer{-0.125})

0 commit comments

Comments
 (0)