fade out players after they missed
This commit is contained in:
parent
3bccdc5540
commit
085cd719fa
|
@ -146,6 +146,7 @@ public class ReplayPlayback {
|
|||
private int HITIMAGETIMERFADESTART = 500;
|
||||
private int HITIMAGETIMERFADEEND = 700;
|
||||
private float HITIMAGETIMERFADEDELTA = HITIMAGETIMERFADEEND - HITIMAGETIMERFADESTART;
|
||||
private int HITIMAGEDEADFADE = 15000;
|
||||
private void showHitImage(int renderdelta, int ypos) {
|
||||
if (hitImage == null) {
|
||||
return;
|
||||
|
@ -162,6 +163,13 @@ public class ReplayPlayback {
|
|||
if (!missed && hitImageTimer > HITIMAGETIMERFADESTART) {
|
||||
color.a = (HITIMAGETIMERFADEEND - hitImageTimer) / HITIMAGETIMERFADEDELTA;
|
||||
}
|
||||
if (missed) {
|
||||
if (hitImageTimer > HITIMAGEDEADFADE) {
|
||||
this.color.a = color.a = 0f;
|
||||
} else {
|
||||
this.color.a = color.a = 1f - (float) hitImageTimer / HITIMAGEDEADFADE;
|
||||
}
|
||||
}
|
||||
float scale = 1f;
|
||||
float offset = 0f;
|
||||
if (hitImageTimer < HITIMAGETIMEREXPAND) {
|
||||
|
@ -284,7 +292,7 @@ public class ReplayPlayback {
|
|||
if (!missed) {
|
||||
result = HIT_50;
|
||||
} else {
|
||||
ReplayPlayback.this.color = missedColor;
|
||||
ReplayPlayback.this.color = new Color(missedColor);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user