saIncoming method
- SamModel sm,
- SamReq req
action handler for BK.saIncoming button press
We find dormant Missiles by looking at the children
and start them. The stepParms
map is used to pass the
delay factor which increases every iteration.
Implementation
void saIncoming(SamModel sm,SamReq req) {
assert(log("clickIncoming $sm"));
int incr = 0;
int delay = sm.getHot("delay");
for(Missile m in sm.kids) {
assert(log("start $m"));
if (m.isState(RK.ssReady)) {
m.presentNow(RK.saStartCtr,stepParms:{"delay":delay + incr});
incr += delay;
}
}
}