Results 1 to 3 of 3
Thread: Game move function
- 07-06-2011, 05:54 AM #1
Senior Member
- Join Date
- Jul 2011
- Location
- Melbourne, Victoria, Australia
- Posts
- 155
- Rep Power
- 2
Game move function
Hi, i a moveUp() and moveDown() function that currently just increment and decrement the "y" value each time they are called. The outcome of this is that my object only moves slowly, how could i add more than one, say 10, to the "y" value each time?
Those two functions look like this:
Java Code:public moveUp() { y++; } public moveDown() { y++; }
- 07-06-2011, 06:03 AM #2
Senior Member
- Join Date
- Feb 2011
- Location
- Georgia, USA
- Posts
- 122
- Rep Power
- 0
y += 10;
or
y = y + 10;
- 07-06-2011, 06:11 AM #3
Senior Member
- Join Date
- Jul 2011
- Location
- Melbourne, Victoria, Australia
- Posts
- 155
- Rep Power
- 2
Similar Threads
-
Complete Game Engine for beginner and intermediate game programmers
By rdjava in forum Java GamingReplies: 1Last Post: 06-02-2011, 09:29 AM -
Calling function in Javascript- from other function
By jdigger in forum New To JavaReplies: 1Last Post: 02-27-2011, 09:00 PM -
Move from console to GUI
By MaxMonic in forum Advanced JavaReplies: 2Last Post: 01-01-2011, 06:34 AM -
Rpg game player wont move help please
By askumi in forum New To JavaReplies: 19Last Post: 12-22-2010, 02:21 AM -
Possible? Callback function passed as arguments to another function
By TreyAU21 in forum Advanced JavaReplies: 3Last Post: 12-04-2009, 03:08 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks