diff options
author | chirs241097@gmail.com <chirs241097@gmail.com@c17bf020-1265-9734-9302-a83f62007ddb> | 2014-07-04 00:17:07 +0000 |
---|---|---|
committer | chirs241097@gmail.com <chirs241097@gmail.com@c17bf020-1265-9734-9302-a83f62007ddb> | 2014-07-04 00:17:07 +0000 |
commit | 8bbaaee3319d5490ac0d68c28d309b180ec07f28 (patch) | |
tree | 1db6d9ad7500d6c638803b4226f9261bd00ae397 /scoresystem.h | |
parent | e2623a2ba1b5789ae299c29804697d004a8cd886 (diff) | |
download | bullet-lab-remix-8bbaaee3319d5490ac0d68c28d309b180ec07f28.tar.xz |
Change configuration and score file names. Files with their names begin
with "." may be annoying in Windows though...
Fix the problem that in-game music won't be resumed when back from
pause.
Fix the problem that Multpo's won't be removed if a new game is created.
Fix the problem that the first tip is not shown correctly if the game
is restarted.
(Probably) fixed the problem that the sound is played out of game.
Prevent Multpo's from "escaping". This happens when fps is extremely
low...
Adding Multpo for Level2.
Update CanonTechno.
Diffstat (limited to 'scoresystem.h')
-rw-r--r-- | scoresystem.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/scoresystem.h b/scoresystem.h index 53ac222..31bd62b 100644 --- a/scoresystem.h +++ b/scoresystem.h @@ -30,26 +30,27 @@ private: double Lifetime,LifeLim,speed; vector2d position,direction; int blinkbrk; - bool Active,blnkshow; + bool Active,blnkshow,followplyr; public: bool IsActive(){return Active;} void Init(double _lt,double _speed,vector2d _pos,vector2d _dir) { Lifetime=0;LifeLim=_lt;speed=_speed;position=_pos;direction=_dir; Mult=new hgeSprite(SprSheet,0,272,48,48);Active=true;blinkbrk=0;blnkshow=true; - Mult->SetHotSpot(24,24); + Mult->SetHotSpot(24,24);followplyr=false; } void Process() { - if (GetDist(playerpos,position)<=64) + if(GetDist(playerpos,position)<=64)followplyr=true; + if(followplyr) { direction=ToUnitCircle(playerpos-position); speed=0.3; } - if (GetDist(playerpos,position)<=9)++mult,NewMT(),Active=false; + 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) + if(Lifetime>LifeLim)return (void)(Active=false); + if(Lifetime>LifeLim*0.8) { if (!LOWFPS)++blinkbrk;else blinkbrk+=17; if (blinkbrk>200)blinkbrk=0,blnkshow=!blnkshow; @@ -86,6 +87,7 @@ void Mult_Init() multbrk=TenSeconds;multbat=mult=1;valbrk=0; MB=new hgeSprite(MultFnt->GetTexture(),0,235,163,21); MB->SetHotSpot(81.5,10.5); + memset(Multpo,0,sizeof(Multpo)); } double GetHscle() { |