HaxeFlixel / flixel-docs

Documentation for HaxeFlixel
73 stars 134 forks source link

Missing instruction and typos in tutorial Part VIII #86

Closed echo99 closed 10 years ago

echo99 commented 10 years ago

In the tutorial, Part VIII: Enemies and Basic AI, there is a step left out where the following piece of code needs to be added to the Enemy class in order for them to update properly.

override public function update():Void 
{
    _brain.update();
    super.update();
}

There is also a typo in the same page where

loadGraphic("assets/images/enemy-" + Std.string(etype) + ".png, true, 16, 16);

should read:

loadGraphic("assets/images/enemy-" + Std.string(etype) + ".png", true, 16, 16);

Also:

public var activeState:Void-<Void;

public function new(?InitState:Void-<Void):Void
{
    activeState = InitState;
}

should be

public var activeState:Void->Void;

public function new(?InitState:Void->Void):Void
{
    activeState = InitState;
}

Don't know if you guys already knew about these issues but just wanted to point them out. Anyway, great tutorial!

Gama11 commented 10 years ago

Thanks for reporting these issues!

How about submitting a pull request fixing them? :) ('Edit' on this page)