- inputs are usually callback events, so the thing I usually did was accumulate all inputs in the callback events and then processed them in the processInputs() method. Accumulate was something simple like pressedKeys |= pressedKey
- updateScreen() is usually just a call to repaint() or something like that, which makes the Operating System call your applications paint() method. My paint method looks like
paint(Graphics g){
drawBackground(g);
drawCounters(g);
drawMonsters(g);
drawPlayer(g);
}
and so on... Flex does things in a slightly different way, so it really depends on the technology you choose.
- inputs are usually callback events, so the thing I usually did was accumulate all inputs in the callback events and then processed them in the processInputs() method. Accumulate was something simple like pressedKeys |= pressedKey
- updateScreen() is usually just a call to repaint() or something like that, which makes the Operating System call your applications paint() method. My paint method looks like
paint(Graphics g){
drawBackground(g);
drawCounters(g);
drawMonsters(g);
drawPlayer(g);
}
and so on... Flex does things in a slightly different way, so it really depends on the technology you choose.