A Simple Shooter Doesn't Work?
-
So I am pretty sure I followed the tutorial right but when I go to run it nothing happens it's just a blank window. Did I do something wrong?
-
My guess is that you haven't set
HXP.scene
to the GameScene you created. (For some reason the tutorial doesn't mention this step.) Make sure that you have this inside theMain.hx
file:override public function init() { HXP.scene = new GameScene(); }
-
Well after doing that I now get this.
src/entities/Ship.hx:45: characters 37-45 : Class<haxepunk.HXP> has no field signAnd it takes me to the ship.hx and brings me to this line "velocity = maxVelocity * HXP.sign(velocity);"
P.S: If I remove the line the game runs but I'm not sure if this line does anything important...
-
sign
and other math functions that were onHXP
have been moved tohaxepunk.math.MathUtil
.