|
|
|
@ -55,7 +55,6 @@ public: |
|
|
|
|
int badNeggCount=0; |
|
|
|
|
int tailSize=0; |
|
|
|
|
int score=0; |
|
|
|
|
boolean justTouched=false; |
|
|
|
|
|
|
|
|
|
void assignNeggRandomPos() { |
|
|
|
|
do { |
|
|
|
@ -205,6 +204,11 @@ public: |
|
|
|
|
} |
|
|
|
|
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; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -225,7 +229,10 @@ public: |
|
|
|
|
assignNeggRandomPos(); |
|
|
|
|
tailSize++; |
|
|
|
|
score+=neggType; |
|
|
|
|
justTouched=true; |
|
|
|
|
scorePos[0]=meercaPos[0]; |
|
|
|
|
scorePos[1]=meercaPos[1]-12; |
|
|
|
|
scoreTransparency=255; |
|
|
|
|
scoreValue=neggType; |
|
|
|
|
neggType=1; |
|
|
|
|
while (rand()%2==0&&neggType<10) { |
|
|
|
|
neggType++; |
|
|
|
|