We are about to switch to a new forum software. Until then we have removed the registration on this forum.
hello everyone, im doing a space invader like game, but this one has a selection screen like street fighter & mortal combat for selecting ships.
i defined the specific coordinates for specific images and wrote the code for this but when i clicked code is running but when i released im turning back to select screen.
how can i make this function permanent ?
sorry for grammer btw im'not native !
Answers
You need a state system where you say you are in stateSelectShip and then in stateGame
Where your mousePressed occurs say
state = stateGame;
before setup()
final int stateGame=1;
int state=stateGame;
in draw say switch(state){ and act accordingly- nothing is allowed in draw() outside that switch