Thursday, November 15, 2012

Jumping

On Greenfoot I learned to make my actor jump. Making him jump is very similar to making an actor fall. What you do is write public void jump(). Then in the parameters you write vspeed = -(whatever number you want);. The negative makes it go up. then you write fall() in the parameters. In my last post I believed I defined fall().  Then in the checkkeys I made the spacebar make the actor jump. Now that I know how to make an actor run,jump and fall I think I have all the things I need to make a very basic 2D game which I think I'm going to try to do.

No comments:

Post a Comment