character - Reseting the player position when a certain Y coordinate is reached -


my problem whenever character reaches y coordinate, want position reset @ (destination x, destination y). have far, , isn't working. of other code works, whenever walk y coordinate, doesn't anything. named boolean y coordinate "death".

    boolean death = false;      if (jumper.getposition().y == 1.0f ) {         death = true;     } 

and here try reset it:

    if (death == true) {         create();     } 

can't simplify this:

if (jumper.getposition().y == 1.0f ) {     // print here     create(); } 

and if it's not working might because conditional isn't correct ... want make sure type same can compare , accessing object want access. (you might want make both ints if you're doing 1 because floats funsies , values aren't represented if you're doing bunch of computation on can throw values off).


Comments

Popular posts from this blog

How do you change vbulletin's home page to the forums instead of the default (CMS or Activity Stream)? -

c++ - Troubles when compiling phash program -