aboutsummaryrefslogtreecommitdiff
path: root/scoresystem.h
diff options
context:
space:
mode:
authorGravatar chirs241097@gmail.com <chirs241097@gmail.com@c17bf020-1265-9734-9302-a83f62007ddb> 2014-07-10 13:47:24 +0000
committerGravatar chirs241097@gmail.com <chirs241097@gmail.com@c17bf020-1265-9734-9302-a83f62007ddb> 2014-07-10 13:47:24 +0000
commit32a2523dd5c51b31b31f5e43a7cebdb16e7f5e84 (patch)
treec69ce4a4009caf59916400957a6ae7f7e18c86ba /scoresystem.h
parentd726aac2d9bac76f095ad6559d7dc30d97c3a97f (diff)
downloadbullet-lab-remix-32a2523dd5c51b31b31f5e43a7cebdb16e7f5e84.tar.xz
Dear Pre-Release Candidate version(RC-0).
CLR will collect multiplier +1's in range now. Multiplier +1's caught by player won't disappear now. Add/Move background transitions. Add volume control to options. This make the configuration file not compatible with older versions. Just delete it! Modify hge's API so that it can handle real volume and pan values. Volume value varys from 0 to 1, pan value varys from -1 to 1. Document...
Diffstat (limited to 'scoresystem.h')
-rw-r--r--scoresystem.h22
1 files changed, 16 insertions, 6 deletions
diff --git a/scoresystem.h b/scoresystem.h
index 31bd62b..ff7e4b7 100644
--- a/scoresystem.h
+++ b/scoresystem.h
@@ -42,13 +42,20 @@ public:
void Process()
{
if(GetDist(playerpos,position)<=64)followplyr=true;
+ if(!clrmode)
+ {
+ if(clrrange!=0&&GetDist(playerpos,position)<=clrmaxrange)followplyr=true;
+ }
+ else
+ {
+ if(clrrad-pi/2>1e-7&&GetDist(playerpos,position)<=clrmaxrange)followplyr=true;
+ }
if(followplyr)
{
direction=ToUnitCircle(playerpos-position);
- speed=0.3;
- }
+ speed=0.4;
+ }else Lifetime+=hge->Timer_GetDelta();
if(GetDist(playerpos,position)<=9)++mult,NewMT(),Active=false;
- Lifetime+=hge->Timer_GetDelta();
if(Lifetime>LifeLim)return (void)(Active=false);
if(Lifetime>LifeLim*0.8)
{
@@ -59,8 +66,11 @@ public:
}
else
Mult->RenderEx(position.x,position.y,0,0.8);
- if (position.x>780||position.x<20)direction.x=-direction.x;
- if (position.y>780||position.y<20)direction.y=-direction.y;
+ if(!followplyr)
+ {
+ if (position.x>780||position.x<20)direction.x=-direction.x;
+ if (position.y>780||position.y<20)direction.y=-direction.y;
+ }
int times=1;if (LOWFPS)times=17;
for (int i=1;i<=times;++i)
position.x+=direction.x*speed,position.y+=direction.y*speed;
@@ -71,7 +81,7 @@ void NewMultpo(vector2d pos=vector2d(-99,-99))
{
int i=0;while (Multpo[i].IsActive())++i;
if (pos.x+99<=1e-6&&pos.y+99<=1e-6)
- pos.x=rand()%750+20,pos.y=rand()%550+20;
+ pos.x=re.NextInt(20,770),pos.y=re.NextInt(20,570);
vector2d dir=ToUnitCircle(vector2d(rand()%1000-500,rand()%1000-500));
Multpo[i].Init(7.5,0.02,pos,dir);
}