All pastes #71737 Raw Edit

Vic

public text v1 · immutable
#71737 ·published 2006-06-26 02:23 UTC
rendered paste body
        public void Activity()
        {
            // this code will be called once per frame.
            if (inpMan.KeyDown(Key.Up))
                
                    myFirstSprite.yVelocity = 5;

            else if (inpMan.KeyDown(Key.Down))
            {
                if (!Collisions.rectCollisionAllowanceMove(myFirstSprite, gS))
                    myFirstSprite.yVelocity = -5;
            }
            else

                myFirstSprite.yVelocity = 0;



            if (inpMan.KeyDown(Key.Right))

                myFirstSprite.xVelocity = 5;

            else if (inpMan.KeyDown(Key.Left))

                myFirstSprite.xVelocity = -5;

            else

                myFirstSprite.xVelocity = 0;

// "V" sez "Ya know, you're setting yVelocity to 0 at the top of this function - might be why
// the jump isn't working
            if (inpMan.KeyPress(Key.Space))
            {
                jump();
            }
 
        }