00160724 陳虹伶
00160865 胡凱翔
1. 請列出你今天三個小時,要完成的事
2. 你在期中作品要做到什麼程度
3. Why? 你為什麼要做它
主題:ZOMBIE SHOOT.改
1.加入兩段倒數計時,第一段為開始之前的倒數3秒,3秒後程式開始執行,
執行時間為30秒,倒數30秒後結束執行程式。
計分器、
2.你在期中作品要做到什麼程度
與手機版的相似度達90%以上,再做點變化,
例如:原本3路殭屍變8路,由鍵盤上的數字鍵1~8來打殭屍...
3.原本在手機上玩只有三排殭屍可以打,突然想到如果用電腦玩,
那就能用更多手指,配上更多排殭屍,讓遊戲程度變得更加困難、
更有挑戰性。
int []bz=new int[1000];
PImage imgZombie;
PImage imgRZombie;
PImage imgShoot;
void setup(){
size(800,600);
imgZombie=loadImage("zombie.jpg");
imgRZombie=loadImage("Rzombie.jpg");
imgShoot=loadImage("shoot.jpg");
for(int i=0;i<1000;i++){
bz[i]=int(random(8));
}
}
int now=0;
int a=1;
int total=0;
int countDown=240;
int countDown2=1860;
void draw(){
if(countDown>0){
background(70,53,1);
countDown--;
text(countDown/60+"秒",400,300);
return;
}
background(70,53,1);
if(countDown2>0){
countDown2--;
text(countDown2/60+"秒",400,300);
for(int i=now;i<now+5;i++){
if(now<=50)image(imgZombie,bz[i]*100,400-(i-now)*100);
if(now>50)image(imgRZombie,bz[i]*100,400-(i-now)*100);
}
image(imgShoot,0,500);
image(imgShoot,100,500);
image(imgShoot,200,500);
image(imgShoot,300,500);
image(imgShoot,400,500);
image(imgShoot,500,500);
image(imgShoot,600,500);
image(imgShoot,700,500);
}
text(total,400,400);
}
void keyPressed(){
if(key==bz[now]+'1')
{
now++;
total=total+a;
}
}
沒有留言:
張貼留言