From 8c78ae3fa945324b2b5fa05b06f482ff8363af2b Mon Sep 17 00:00:00 2001 From: "chirs241097@gmail.com" Date: Sun, 9 Mar 2014 13:41:46 +0000 Subject: One new level, small level changes. --- towernbullet.h | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 87 insertions(+), 4 deletions(-) (limited to 'towernbullet.h') diff --git a/towernbullet.h b/towernbullet.h index fce9fdd..a9bae85 100644 --- a/towernbullet.h +++ b/towernbullet.h @@ -1529,12 +1529,35 @@ public: done=false; PMod=pmd; r1lim=_r1lim;r2lim=_r2lim;boomlim=_boomlim; - if (re.NextInt(0,99)>boomlim) + if (re.NextInt(0,100)>boomlim) pos=re.NextInt(0,600); else pos=999; untitledlas.SetTexture(SprSheet,0,264,248,8); } + void noname2pnt() + { + if(!las) + CreateBullet255(untitledbul.bulletpos.x,untitledbul.bulletpos.y,10); + else + { + for (int i=0;i<60;++i) + { + double trad=(i/60.0f)*pi*2; + vector2d a; + if (!(i%PMod)) + { + a.x=cos(trad)*range2;a.y=sin(trad)*range2; + } + else + { + a.x=cos(trad)*range1;a.y=sin(trad)*range1; + } + a=a+untitledbul.bulletpos; + CreateBullet255(a.x,a.y,10); + } + } + } void Process() { if (!las) @@ -1569,7 +1592,7 @@ public: b.x=cos(trad)*(range1-10);b.y=sin(trad)*(range1-10); } for (int i=60;iTimer_GetFPS()); + if(spd+acc*(1000.0f/hge->Timer_GetFPS())Timer_GetFPS()); + if(bulletpos.y>610)active=false; + Update_SimpBul(); + } + }bullets[1000]; +public: + double crbrk,llim;TColors col; + void Init(TColors initcol,double _llim) + { + col=initcol;llim=_llim; + crbrk=re.NextDouble(0,frameleft/(double)(AMinute+ThirtySeconds))*(part==36?0.07:0.02)+0.03; + } + void Reverse() + { + if(col==red)col=green; + else if(col==green)col=red; + for(int i=0;i<500;++i)if(bullets[i].isActive())bullets[i].Reverse(); + } + void Update() + { + crbrk-=hge->Timer_GetDelta(); + if(crbrk<=0) + { + crbrk=re.NextDouble(0,frameleft/(double)AMinute)*(part==36?0.07:0.02)+0.03; + for(int i=0;i<500;++i) + if(!bullets[i].isActive()) + { + bullets[i].achromaInit(vector2d(re.NextDouble(10,790),10),col,llim); + break; + } + } + for(int i=0;i<500;++i)if(bullets[i].isActive())bullets[i].achromaUpdate(); + } +}; -- cgit v1.2.3