From e33464c9892a8dc26cb0ea2a6e6c3e3585a1f518 Mon Sep 17 00:00:00 2001 From: "chirs241097@gmail.com" Date: Tue, 25 Mar 2014 13:51:16 +0000 Subject: Two levels, one new interface for BCircle. --- CHANGELOG.TXT | 2 ++ levels.h | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- main.cpp | 4 +++ towernbullet.h | 5 +++ 4 files changed, 112 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT index 45d8cfa..aa33000 100755 --- a/CHANGELOG.TXT +++ b/CHANGELOG.TXT @@ -9,7 +9,9 @@ can not reproduce now...) Pre-Released versions: 0.9.0-0_PR (b78) First two assessment levels. +Two more assessment levels... Finish assessment system framework. +Add circ2pnt. 0.8.1-1_PR (b77) All parts from level -1 to 7 are completed! diff --git a/levels.h b/levels.h index a660c72..8bebf7d 100644 --- a/levels.h +++ b/levels.h @@ -3077,7 +3077,10 @@ void Levelm1Part4() void Levelm1Part5()//Spiky { frameleft=AMinute+ThirtySeconds; - All2pnt();towcnt=0; + for(int i=0;i<200;++i) + if (scircles[i].GetRange()>1e-7&&scircles[i].GetRange()<510) + scircles[i].circ2pnt(); + towcnt=0; Lasercnt=0; ++part;avabrk=1;avacurbrk=0.5; } @@ -3620,3 +3623,100 @@ void Levelm2Part4() CreateBullet2(400,300,rspeed,re.NextDouble(-pi,pi)); } } +BCircle asscircles[200]; +void Levelm2Part5() +{ + frameleft=Infinity; + DisableAllTower=false; + if (IfShowTip) + { + IfShowTip=false; + FadeTip=false; + Current_Position=2; + ShowTip("Test 4 - Crossing 1"); + All2pnt(); + return; + } + if (towcnt!=0)return ClearAll(false); + if(Current_Position==1) + { + assetime=0;memset(asscircles,0,sizeof(asscircles)); + ++part;avabrk=0;avacurbrk=0; + } +} +void Levelm2Part6() +{ + frameleft=Infinity; + assetime+=hge->Timer_GetDelta(); + avacurbrk+=hge->Timer_GetDelta(); + if(avacurbrk>avabrk) + { + for(int i=0;i<200;++i) + if (asscircles[i].GetRange()>800||asscircles[i].GetRange()<1e-7) + asscircles[i].Init(1,assetime/120.0f*0.00025,36,vector2d(250,300),blue);break; + for(int i=0;i<200;++i) + if (asscircles[i].GetRange()>800||asscircles[i].GetRange()<1e-7) + asscircles[i].Init(1,-assetime/120.0f*0.00025,36,vector2d(550,300),blue);break; + avacurbrk=0; + avabrk=3-assetime/60; + if(avabrk<0.5)avabrk=0.5; + } + for(int i=0;i<200;++i) + { + if (asscircles[i].GetRange()>1e-7&&asscircles[i].GetRange()<800) + { + asscircles[i].SetRange(asscircles[i].GetRange()+(LOWFPS?17:1)*0.05); + asscircles[i].Update(); + } + } +} +void Levelm2Part7() +{ + frameleft=Infinity; + DisableAllTower=false; + if (IfShowTip) + { + IfShowTip=false; + FadeTip=false; + Current_Position=2; + ShowTip("Test 4 - Crossing 2"); + All2pnt(); + return; + } + if (towcnt!=0)return ClearAll(false); + if(Current_Position==1) + { + assetime=0; + for(int i=0;i<200;++i) + if (asscircles[i].GetRange()>1e-7&&asscircles[i].GetRange()<800) + asscircles[i].circ2pnt(); + memset(asscircles,0,sizeof(asscircles)); + ++part;avabrk=0;avacurbrk=0; + } +} +void Levelm2Part8() +{ + frameleft=Infinity; + assetime+=hge->Timer_GetDelta(); + avacurbrk+=hge->Timer_GetDelta(); + if(avacurbrk>avabrk) + { + for(int i=0;i<200;++i) + if (asscircles[i].GetRange()>800||asscircles[i].GetRange()<1e-7) + asscircles[i].Init(1,0.0001,36+(24*assetime/120.0f),vector2d(400,300),blue);break; + for(int i=0;i<200;++i) + if (asscircles[i].GetRange()>800||asscircles[i].GetRange()<1e-7) + asscircles[i].Init(1,-0.0001,36+(24*assetime/120.0f),vector2d(400,300),blue);break; + avacurbrk=0; + avabrk=2-assetime/60; + if(avabrk<0.3)avabrk=0.3; + } + for(int i=0;i<200;++i) + { + if (asscircles[i].GetRange()>1e-7&&asscircles[i].GetRange()<800) + { + asscircles[i].SetRange(asscircles[i].GetRange()+(LOWFPS?17:1)*0.05); + asscircles[i].Update(); + } + } +} diff --git a/main.cpp b/main.cpp index f189608..5d44861 100644 --- a/main.cpp +++ b/main.cpp @@ -526,6 +526,10 @@ void CallLevels() if (level==-2&&part==2)Levelm2Part2(); if (level==-2&&part==3)Levelm2Part3(); if (level==-2&&part==4)Levelm2Part4(); + if (level==-2&&part==5)Levelm2Part5(); + if (level==-2&&part==6)Levelm2Part6(); + if (level==-2&&part==7)Levelm2Part7(); + if (level==-2&&part==8)Levelm2Part8(); if (level==1&&part==5)level=2,part=0; if (level==2&&part==10) diff --git a/towernbullet.h b/towernbullet.h index 5d6ad95..d3d408c 100644 --- a/towernbullet.h +++ b/towernbullet.h @@ -2014,6 +2014,11 @@ public: void SetDT(double _DT){DT=_DT;} double GetDT(){return DT;} double GetRad(){return radian;} + void circ2pnt() + { + for(int i=1;i<=BCnt;++i) + CreateBullet255(Bullets[i].bulletpos.x,Bullets[i].bulletpos.y,10); + } void Update() { DT+=hge->Timer_GetDelta(); -- cgit v1.2.3