Added hit animations, updated lighting & added InteliJ to gitignore
This commit is contained in:
parent
07075c094b
commit
87e68bd494
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -15,5 +15,10 @@
|
|||
.classpath
|
||||
.project
|
||||
|
||||
# IntelliJ
|
||||
.idea/
|
||||
*.iml
|
||||
*.iws
|
||||
|
||||
Thumbs.db
|
||||
/target
|
||||
|
|
BIN
res/lighting.png
BIN
res/lighting.png
Binary file not shown.
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 39 KiB |
Binary file not shown.
Before Width: | Height: | Size: 13 KiB |
|
@ -47,6 +47,9 @@ public class GameData {
|
|||
/** Time, in milliseconds, for a hit result to fade. */
|
||||
public static final int HITRESULT_FADE_TIME = 500;
|
||||
|
||||
/** Time, in milliseconds, for a hit circle to fade. */
|
||||
public static final int HITCIRCLE_FADE_TIME = 233;
|
||||
|
||||
/** Duration, in milliseconds, of a combo pop effect. */
|
||||
private static final int COMBO_POP_TIME = 250;
|
||||
|
||||
|
@ -839,18 +842,23 @@ public class GameData {
|
|||
// hit lighting
|
||||
else if (Options.isHitLightingEnabled() && hitResult.result != HIT_MISS &&
|
||||
hitResult.result != HIT_SLIDER30 && hitResult.result != HIT_SLIDER10) {
|
||||
float scale = 1f + ((trackPosition - hitResult.time) / (float) HITRESULT_FADE_TIME);
|
||||
Image scaledLighting = GameImage.LIGHTING.getImage().getScaledCopy(scale);
|
||||
Image scaledLighting1 = GameImage.LIGHTING1.getImage().getScaledCopy(scale);
|
||||
scaledLighting.setAlpha(hitResult.alpha);
|
||||
scaledLighting1.setAlpha(hitResult.alpha);
|
||||
|
||||
scaledLighting.draw(hitResult.x - (scaledLighting.getWidth() / 2f),
|
||||
hitResult.y - (scaledLighting.getHeight() / 2f), hitResult.color);
|
||||
scaledLighting1.draw(hitResult.x - (scaledLighting1.getWidth() / 2f),
|
||||
hitResult.y - (scaledLighting1.getHeight() / 2f), hitResult.color);
|
||||
// soon add particle system to reflect original game
|
||||
Image lighting = GameImage.LIGHTING.getImage();
|
||||
lighting.setAlpha(hitResult.alpha);
|
||||
lighting.drawCentered(hitResult.x, hitResult.y, hitResult.color);
|
||||
}
|
||||
|
||||
// hit animation
|
||||
Image scaledHitCircle = GameImage.HITCIRCLE.getImage().getScaledCopy(
|
||||
1f + (((float)(trackPosition - hitResult.time) / HITCIRCLE_FADE_TIME) / 2));
|
||||
scaledHitCircle.setAlpha(1f - Utils.clamp((float)(trackPosition - hitResult.time) / HITCIRCLE_FADE_TIME, 0, 1));
|
||||
Image scaledHitCircleOverlay = GameImage.HITCIRCLE_OVERLAY.getImage().getScaledCopy(
|
||||
1f + (((float)(trackPosition - hitResult.time) / HITCIRCLE_FADE_TIME) / 2));
|
||||
scaledHitCircleOverlay.setAlpha(1f - Utils.clamp((float) (trackPosition - hitResult.time) / HITCIRCLE_FADE_TIME, 0, 1));
|
||||
|
||||
scaledHitCircle.drawCentered(hitResult.x, hitResult.y, hitResult.color);
|
||||
scaledHitCircleOverlay.drawCentered(hitResult.x, hitResult.y);
|
||||
|
||||
hitResult.alpha = 1 - ((float) (trackPosition - hitResult.time) / HITRESULT_FADE_TIME);
|
||||
} else
|
||||
iter.remove();
|
||||
|
|
|
@ -202,7 +202,6 @@ public enum GameImage {
|
|||
SCORE_PERCENT ("score-percent", "png"),
|
||||
SCORE_X ("score-x", "png"),
|
||||
LIGHTING ("lighting", "png"),
|
||||
LIGHTING1 ("lighting1", "png"),
|
||||
|
||||
// Game Mods
|
||||
MOD_EASY ("selection-mod-easy", "png", false, false),
|
||||
|
|
Loading…
Reference in New Issue
Block a user