"Play with me" Inaktivitätsanzeige hinzugefügt

This commit is contained in:
nimeissn 2022-06-15 18:12:39 +02:00
parent ba60af1c3d
commit 682a8345ab

View file

@ -157,7 +157,7 @@ void loop()
if (isButtonPressed()) { if (isButtonPressed()) {
gameState = GAME_STATE_INIT; gameState = GAME_STATE_INIT;
} }
else if (millis() - lastDrawUpdate > 300000) else if (millis() - lastDrawUpdate > 30000)
{ {
resetLEDs(); resetLEDs();
pointsPlayerBlue = 0; pointsPlayerBlue = 0;
@ -480,13 +480,58 @@ void playTone(byte type)
void attentionLight() void attentionLight()
{ {
int n = random(0,200); int play [44] = {18,17,16,15,14,13,26,33,34,35,24,53,54,55,56,57,58,61,78,81,102,103,104,105,106,101,113,126,133,134,135,136,137,138,124,115,178,177,176,175,165,153,185,193};
int m = random(0,200); int with [46] = {13,14,15,16,17,18,22,36,42,58,57,56,55,54,53,73,74,75,76,77,78,93,106,114,126,133,115,116,117,118,113,154,155,156,157,158,153,163,176,183,193,195,196,197,198,194};
int r = random(0,250); int me [30] = {53,54,55,56,57,58,65,75,85,93,94,95,96,97,98,113,114,115,116,117,118,126,138,146,121,133,144,124,135,141};
int g = random(0,250);
int b = random(0,250);
pixels.setPixelColor(n,Color(r,g,b));
pixels.setPixelColor(m,r,g,b); for (int i = 0; i< 200; i++)
{
pixels.setPixelColor(i,Color(0,5,5));
}
pixels.show(); pixels.show();
delay(1000); delay(1000);
for (int i = 0; i<44; i++)
{
pixels.setPixelColor(play[i],Color(255,0,0));
}
pixels.show();
delay(1500);
for (int i = 0; i< 200; i++)
{
pixels.setPixelColor(i,Color(5,5,5));
}
for (int i = 0; i<46; i++)
{
pixels.setPixelColor(with[i],Color(255,0,0));
}
pixels.show();
delay(1500);
for (int i = 0; i< 200; i++)
{
pixels.setPixelColor(i,Color(5,5,5));
}
for (int i = 0; i<30; i++)
{
pixels.setPixelColor(me[i],Color(255,0,0));
}
pixels.show();
delay(1500);
lastDrawUpdate = millis();
resetLEDs();
} }