generated from sigonasr2/CPlusPlusProjectTemplate
Display score floater
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
parent
bde77146f5
commit
3a8a914bbc
BIN
MeercaChase
BIN
MeercaChase
Binary file not shown.
@ -55,7 +55,6 @@ public:
|
|||||||
int badNeggCount=0;
|
int badNeggCount=0;
|
||||||
int tailSize=0;
|
int tailSize=0;
|
||||||
int score=0;
|
int score=0;
|
||||||
boolean justTouched=false;
|
|
||||||
|
|
||||||
void assignNeggRandomPos() {
|
void assignNeggRandomPos() {
|
||||||
do {
|
do {
|
||||||
@ -205,6 +204,11 @@ public:
|
|||||||
}
|
}
|
||||||
DrawCircle({(float)meercaPreviousPos[(i*8+6)],(float)meercaPreviousPos[(i*8+7)]},8);
|
DrawCircle({(float)meercaPreviousPos[(i*8+6)],(float)meercaPreviousPos[(i*8+7)]},8);
|
||||||
}
|
}
|
||||||
|
if (scoreTransparency>0) {
|
||||||
|
scorePos[1]-=0.03;
|
||||||
|
scoreTransparency--;
|
||||||
|
DrawString({scorePos[0],scorePos[1]},"+"+to_string(scoreValue),olc::Pixel(0,0,255,scoreTransparency),2);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -225,7 +229,10 @@ public:
|
|||||||
assignNeggRandomPos();
|
assignNeggRandomPos();
|
||||||
tailSize++;
|
tailSize++;
|
||||||
score+=neggType;
|
score+=neggType;
|
||||||
justTouched=true;
|
scorePos[0]=meercaPos[0];
|
||||||
|
scorePos[1]=meercaPos[1]-12;
|
||||||
|
scoreTransparency=255;
|
||||||
|
scoreValue=neggType;
|
||||||
neggType=1;
|
neggType=1;
|
||||||
while (rand()%2==0&&neggType<10) {
|
while (rand()%2==0&&neggType<10) {
|
||||||
neggType++;
|
neggType++;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user