This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Java in General and the fly likes design help Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "design help" Watch "design help" New topic
Author

design help

Evan Pierce
Ranch Hand

Joined: Jan 31, 2006
Posts: 36
hey, i already posted about this in the game development forum but it doesnt seem like anyone reads that part of the forum.

but basicly what im trying to do is make it so when i click a sprite it goes into a state of "activated" and while in this state if the user gets certaint amount of pixels away it will throw sprite off in that direction.

the problem is that when i run my game and click the sprite it freezes my mouse(sprite) inside the sprite and does nothing. heres my code...

//inside main class
//on collision between mouse sprite and other sprite


//inside the sprite class (thing i want to click)



it doesnt seem to ever reach into the if(!ZenGame.leftClick){
[ February 20, 2006: Message edited by: Evan Pierce ]
Evan Pierce
Ranch Hand

Joined: Jan 31, 2006
Posts: 36
ok ive come to the conclusion that whats happening is that when i move my mouse away from the sprite there is no longer a collision so it cant run the if(!leftClick). does anyone have any ideas to how i might implement this to get the desired effect?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: design help
 
Similar Threads
MouseEvent too slow or am I missing something?
Strings
Help With Snake Game
Need help in ball breaker game
keyboard arrow keys not working