0

I'm trying to design a game with Java, so how can I do to make some of the texts blink?

(e.g. Press any Key, Press Y/N and so on) I'm beginning on this and a little bit of help would come in handy.

3rd Sep 2016, 12:00 AM
Hernán Miguel Villarroel Lugo
3 odpowiedzi
+ 2
according to the game engine you are using . but usually the game runs in a loop, for blinking text you can do something like this: boolean blink; gameLoop(){ if(blink)text.setColor(Color.Black); else text.setColor(Color.white); blink=!blink; }
17th Sep 2016, 6:05 PM
Ahmad Samy
Ahmad Samy - avatar
0
Thanks, man! I'm using Eclipse for it... Anyways, there seems to be an error... For the gameloop() { line, it says "The method gameloop() is undefined for the type MainScreen and for the if and else ones, it says "text cannot be resolved." Any suggestions for these errors?
18th Sep 2016, 4:51 PM
Hernán Miguel Villarroel Lugo
0
Hey, creative spirit! Designing a game in Java sounds like an awesome journey! To make some of the text blink, you might want to explore using timers or threads to control the text display. It’s like adding a little extra sparkle to your game, making it even more captivating. And while you’re weaving your game’s magic, check out Crazy Pachinko https://crazy-pachinko.com/tr/ it’s a playful adventure with chances and strategies, reminding us that every game has its own unique rhythm. Keep the creativity flowing and enjoy the ride!
26th Aug 2024, 2:10 PM
Mark Millin
Mark Millin - avatar