I've been using rough numbers to get the feel that I want for the different effect timing.
Speaking of Effects/Transitions. I have a few working! There is a title screen and an exit screen and the fadeTo(nextState) transition almost works perfectly.
Actually I need a little help/ clarification on updating the state and passing functions as args. When you click into a menu the state appears to change ( the BG art and buttons move). But when you try and click back the buttons are initialized but the state variable doesn't seem to update correctly. I had it working earlier but some small thing broke it.
How can I be sure that when I do something like...
Code: Select all
{
-- when a button is pressed to go to the next screen I used to:
//state = Menu() -- works fine.
-- now I want to do something like this:
effect = fadeTo(OptionMenu()) -- inside fadeTo I say state = newState when the screen is all Black.
}
Aside from dealing with this I'm starting to clean up the structure, I need help with eliminating global variables ( if there is a real need to, I understand that it's efficient i just am not clear on where it's appropriate).
This project get's more interesting every day. I'm having a lot of fun with love! Please take a look at my project and let me know if there is anything that I'm doing wrong. Or if I could structure things better to make things faster.