Posted By: Anonymous
Real Programmers... - 04/01/10 08:53
"Real Programmers Don't Document - If it was hard to write, it should be hard to understand."
from the current Gamecreator Newsletter
from the current Gamecreator Newsletter
function skinchange() { var hp; var newhp; while(me) { newhp = my.health; if (newhp < hp) { my.skin = ent_skins(me); wait(1); my.skin = 1; } hp = my.health; wait(2); } }
void STATEMGR_execute(STATEMGR* psState) { /* check whether atate machine is ready */ if ( (LIST_items(psState->psActions) > 0) && (LIST_items(psState->psTransitions) > 0) ) { /* first check, if transition has to be done */ STATEMGR__checkTransitions(psState); /* now execute cyclic action callback */ if (psState->pfAction != NULL) { STATEMGR__pfCallback = psState->pfAction; STATEMGR__pfCallback(); } } }
/*! Execute cyclical actions and transition checks for State Machine. * Must be called cyclically. * \param psState Pointer to affected STATEMGR */ void STATEMGR_execute(STATEMGR* psState);