class Task extends TimerTask {
public void run() {
//计时八分钟
}
}
public class SourceCode {
//建立一个Sean
private Sean sean;
public SourceCode(Sean sean){
this.sean = sean;
//Sean醒来
sean.wakeUp();
//Sean跟Christina说话
sean.talkToChristina();
//建立Sean事件
setListener();
}
public void setListener(){
sean.addSearchListener(
new SearchListener(){
public void Hit(SearchEvent e){
//Sean打人啊~
sean.hit(e.action);
}
public void goThrough(SearchEvent e){
//Sean乱翻东西
sean.goThrough(e.action);
}
public void findSuspect(SearchEvent e){
switch(e.action){
//抓到炸弹客
case catchDerekFrost:
//把炸弹客锁起来
sean.lockDerekFrost();
//打电话叫警察
sean.call(POLICE);
break;
//抓炸弹客失败
case catchDerekFrostFail:
//Sean被杀了
sean.die();
break;
}
}
public void call(SearchEvent e){
switch(e.action){
//Sean打电话给老爸
case CALL_FATHER:
sean.call(FATHER);
break;
//Sean打电话去空军基地
case CALL_AIR_BASE:
sean.call(AIR_BASE);
break;
}
}
public void talk(SearchEvent e){
switch(e.action){
//Sean跟搞笑艺人讲话
case MaxDenoff:
//Sean喷钱了
sean.payMoney(MaxDenoff);
break;
//Sean跟Christina讲话
case Christina:
//Sean跟Christina亲亲
sean.kiss(Christina);
break;
//Sean跟炸弹客讲话
case DerekFrost:
//Sean开枪射炸弹客
sean.shoot(DerekFrost);
break;
}
}
});
}
//火车爆炸
public void TrainBomb(){
//Sean死掉了
sean.die();
//Sean被回收
sean.gc();
}
public static void main(String[] argc){
while(true){
//Colter跟Goodwin说话
colter.talkToGoodwin();
//Colter跟博士说话
colter.talkToDrRutledge();
//Colter生气 或者 Colter跟博士交易成功
if(colter.angry()||colter.deal()){
//建立八分钟计时器
Timer timer = new Timer();
//建立Source code物件
SourceCode sourceCode = new SourceCode(colter);
//8分钟过后
timer.schedule(new Task(), 480000);
//火车爆炸
sourceCode.TrainBomb();
}
if(GoodWinKillColter){
//Goodwin杀了Colter
break;
}
}
HappyEnd();//快乐的结局
}
}