Seems like you need some help with that menu thing...
Here is menu for you.

The demo contains also perfect anti-moonwalk for you!

I hope that helps! And if you need help understanding it, ask me!
EDIT:
One thing I have to explain now.
these kinds of codes:
- Code: Select all
switch(variable)
{
case 0:
//something happens here
break;
case 1:
//something happens here, too!
break;
}
They work in a way like this:
1. They check the value of varible inside the brackets.
2. You can define what happens according to the value of that variable, and it's that
case x:
//here can be anything
break;
-thing.
case is the number of value and then comes what you want to do, like
switch(dir)
{
case 1:
player.x += 5;
break;
}
That code would move player 5 pixels to right when dir is equal to 1.
break is very important, it stops the event from repeating to other cases.
Sorry if I was unclear.
I hope this still cleared something to you.
