利用TimerHandler做一个闪烁10次的效果
pEntity.registerUpdateHandler(new TimerHandler(0.3f, true, new ITimerCallback() {
int count =20;
@Override
public void onTimePassed(TimerHandler pTimerHandler) {
count--;
if(count>0){
pEntity.setVisible(count%2==1);
}else{
pEntity.unregisterUpdateHandler(pTimerHandler);
}
}
}));
http://www.eoeandroid.com/forum-863-1.html
TimerHandler的简单应用
时间: 2024-11-10 03:17:58