資源簡介
植物大戰僵尸java游戲植物大戰僵尸java游戲植物大戰僵尸java游戲

代碼片段和文件信息
package?plantvsplant;
import?java.util.ArrayList;
import?java.util.HashMap;
import?java.util.Iterator;
import?java.util.List;
import?java.util.Map;
import?java.util.Map.Entry;
import?java.util.Set;
import?javax.swing.JLabel;
import?javax.swing.JOptionPane;
import?plantvsplant.entity.Cell;
import?plantvsplant.entity.Corpse;
import?plantvsplant.entity.Grid;
import?plantvsplant.entity.Plant;
import?plantvsplant.tool.BulletMoveThread;
import?plantvsplant.tool.CarThread;
import?plantvsplant.tool.CorpseMoveThread;
import?plantvsplant.tool.MoneyEnoughThread;
import?plantvsplant.tool.ProduceBullet;
import?plantvsplant.tool.SunAdd;
import?plantvsplant.tool.SunAutoProduceThread;
import?plantvsplant.tool.SunflowerProduceThread;
import?plantvsplant.tool.Timer;
import?plantvsplant.tool.plantTrainThread;
import?plantvsplant.win.IndexWin;
import?plantvsplant.win.MyLabel;
import?plantvsplant.win.Win;
public?class?Controller?{
private?Win?win;
private?Grid?grid;
private?IndexWin?indexwin;
private?int?x;
private?int?y;
private?int?length=28;
private?String?plantType?=?“00111“;
private?Timer?timer;
private?int?sunValue;
private?int?corpseNum;
private?boolean?uproot=false;//斷定?能夠挖除植物?0可以挖除
private?int?operation?=?0;//0添加植物?1鏟除植物
private?MoneyEnoughThread?moneyEnoughThread;
private?Map?carRunList=new?HashMap();
private?Map?bulletList=new?HashMap();
private?SunAutoProduceThread?sunAutoProduceThread;
private?Map?plantList=new?HashMap();
private?Map?carList=new?HashMap();
private?Map?corpseList=new?HashMap();
private?Map?produceBulletTimer=new?HashMap();
public?Controller(){
indexwin=new?IndexWin(this);
}
public?void?start(){
SunAdd.stop=false;
this.x=15;
this.y=80;
grid=new?Grid(this.xthis.y);
sunValue=50;
win=Win.getWin(this);
timer=new?Timer(this);
//grid.start();
indexwin.setVisible(false);
sunAutoProduceThread?=?new?SunAutoProduceThread(this);
moneyEnoughThread?=?new?MoneyEnoughThread(this);
win.toShow();
putSunValue(0);
timer.start();
sunAutoProduceThread.start();
moneyEnoughThread.start();
grid.getBoard()[1][0]=“31111“;
grid.getBoard()[4][0]=“31111“;
grid.getBoard()[7][0]=“31111“;
grid.getBoard()[10][0]=“31111“;
grid.getBoard()[13][0]=“31111“;
corpseNum=grid.getNum();
}
public?void?newCorpseThread(){
for?(int?i?=?0;?i? if(“11121314“.contains(grid.getBoard()[i][length-1].substring(02))&&
corpseList.get(grid.getBoard()[i][length-1])==null){
corpseList.put(grid.getBoard()[i][length-1]?new?CorpseMoveThread(thisi?length-1));
corpseList.get(grid.getBoard()[i][length-1]).start();
}
}
}
public?int??moveBullet(int?xint?y){
if(y+1==length-1&&grid.getBoard()[x][y].equals(“21bullet“)){
grid.g
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????226??2011-09-30?15:12??植物大戰僵尸\plantVScorpse\.classpath
?????文件????????372??2011-09-30?15:12??植物大戰僵尸\plantVScorpse\.project
?????文件?????????88??2011-10-10?11:06??植物大戰僵尸\plantVScorpse\.settings\org.eclipse.core.resources.prefs
?????文件???????2479??2011-09-30?15:12??植物大戰僵尸\plantVScorpse\bin\plantvsplant\card\1.jpg
?????文件???????2882??2011-09-30?15:12??植物大戰僵尸\plantVScorpse\bin\plantvsplant\card\2.jpg
?????文件???????2889??2011-09-30?15:12??植物大戰僵尸\plantVScorpse\bin\plantvsplant\card\3.jpg
?????文件???????2829??2011-09-30?15:12??植物大戰僵尸\plantVScorpse\bin\plantvsplant\card\4.jpg
?????文件???????2666??2011-09-30?15:12??植物大戰僵尸\plantVScorpse\bin\plantvsplant\card\5.jpg
?????文件???????2893??2011-09-30?15:12??植物大戰僵尸\plantVScorpse\bin\plantvsplant\card\6.jpg
?????文件???????2886??2011-09-30?15:12??植物大戰僵尸\plantVScorpse\bin\plantvsplant\card\7.jpg
?????文件???????2673??2011-09-30?15:12??植物大戰僵尸\plantVScorpse\bin\plantvsplant\card\8.jpg
?????文件??????18645??2011-09-30?15:12??植物大戰僵尸\plantVScorpse\bin\plantvsplant\card\cardboard.png
?????文件???????1861??2011-10-13?16:11??植物大戰僵尸\plantVScorpse\bin\plantvsplant\Controller$1.class
?????文件????????876??2011-10-13?16:11??植物大戰僵尸\plantVScorpse\bin\plantvsplant\Controller$2.class
?????文件???????1205??2011-10-13?16:11??植物大戰僵尸\plantVScorpse\bin\plantvsplant\Controller$3.class
?????文件??????19449??2011-10-13?16:11??植物大戰僵尸\plantVScorpse\bin\plantvsplant\Controller.class
?????文件??????12968??2011-09-30?15:12??植物大戰僵尸\plantVScorpse\bin\plantvsplant\corpsel\0440011332-3.png
?????文件??????16209??2011-09-30?15:12??植物大戰僵尸\plantVScorpse\bin\plantvsplant\corpsel\04400121322-3.png
?????文件???????9957??2011-09-30?15:12??植物大戰僵尸\plantVScorpse\bin\plantvsplant\corpsel\11.png
?????文件??????12229??2011-09-30?15:12??植物大戰僵尸\plantVScorpse\bin\plantvsplant\corpsel\22.png
?????文件???????7787??2011-09-30?15:12??植物大戰僵尸\plantVScorpse\bin\plantvsplant\corpsel\231641391097.jpg
?????文件???????8949??2011-09-30?15:12??植物大戰僵尸\plantVScorpse\bin\plantvsplant\corpsel\33.png
?????文件???????1565??2011-10-13?16:11??植物大戰僵尸\plantVScorpse\bin\plantvsplant\entity\Cell.class
?????文件???????1703??2011-10-13?16:11??植物大戰僵尸\plantVScorpse\bin\plantvsplant\entity\Corpse.class
?????文件???????8497??2011-10-13?16:11??植物大戰僵尸\plantVScorpse\bin\plantvsplant\entity\Grid.class
?????文件???????2033??2011-10-13?16:11??植物大戰僵尸\plantVScorpse\bin\plantvsplant\entity\Plant.class
?????文件??????46631??2011-09-30?15:12??植物大戰僵尸\plantVScorpse\bin\plantvsplant\index\SelectorScreen_Adventure_highlight.png
?????文件??????66508??2011-09-30?15:12??植物大戰僵尸\plantVScorpse\bin\plantvsplant\index\SelectorScreen_BG_Right.jpg
?????文件??????39791??2011-09-30?15:12??植物大戰僵尸\plantVScorpse\bin\plantvsplant\index\SelectorScreen_Challenges_button.png
?????文件???????3498??2011-09-30?15:12??植物大戰僵尸\plantVScorpse\bin\plantvsplant\index\SelectorScreen_Help1.png
............此處省略143個文件信息
- 上一篇:android簡易瀏覽器
- 下一篇:Jsp網絡在線考試系統源碼分享
評論
共有 條評論