状态转换

2005-12-21 22:41:19 J2ME经验 Views(1193)

作为线程,把初试化下一个状态放在转换状态之前

例如,从主选单进入游戏

gameplay_init();
state = gameplay;

应该上面这样

Load

Load_init(int next state)
{
//进度图片
//当前状态,主状态改变,下一状态,
}

Load_run(){
//图片
//当(temp == 1)   释放
//当(temp == 末) 初始,改变状态
}

Load_free(){
//释放图片资源
}

Comments

Leave a Comment

Name
Content
Verification Type the characters you see in the picture below