feat: polish game HUD scoring and results
This commit is contained in:
@@ -32,8 +32,9 @@ namespace VRBeats
|
||||
tangent = saberUp.sqrMagnitude > 0.001f ? saberUp.normalized : Vector3.right;
|
||||
lift = hitDir.sqrMagnitude > 0.001f ? hitDir.normalized : Vector3.up;
|
||||
|
||||
glowLine = CreateLine("Glow", 0.16f, 0.45f);
|
||||
coreLine = CreateLine("Core", 0.045f, 0.95f);
|
||||
float widthMultiplier = IsBlueDominant(effectColor) ? 1.18f : 1.0f;
|
||||
glowLine = CreateLine("Glow", 0.16f * widthMultiplier, 0.45f);
|
||||
coreLine = CreateLine("Core", 0.045f * widthMultiplier, 0.95f);
|
||||
StartCoroutine(Animate());
|
||||
}
|
||||
|
||||
@@ -67,8 +68,9 @@ namespace VRBeats
|
||||
float bend = Mathf.Lerp(0.12f, 0.34f, t);
|
||||
float alpha = 1.0f - t;
|
||||
|
||||
UpdateLine(glowLine, length, bend, alpha * 0.45f);
|
||||
UpdateLine(coreLine, length * 0.88f, bend * 0.55f, alpha * 0.95f);
|
||||
float alphaMultiplier = VisibilityAlphaMultiplier(effectColor);
|
||||
UpdateLine(glowLine, length, bend, alpha * 0.45f * alphaMultiplier);
|
||||
UpdateLine(coreLine, length * 0.88f, bend * 0.55f, alpha * 0.95f * alphaMultiplier);
|
||||
|
||||
age += Time.deltaTime;
|
||||
yield return null;
|
||||
@@ -136,5 +138,15 @@ namespace VRBeats
|
||||
color.a = 1.0f;
|
||||
return color;
|
||||
}
|
||||
|
||||
private static float VisibilityAlphaMultiplier(Color color)
|
||||
{
|
||||
return IsBlueDominant(color) ? 1.35f : 1.0f;
|
||||
}
|
||||
|
||||
private static bool IsBlueDominant(Color color)
|
||||
{
|
||||
return color.b > color.r && color.b >= color.g;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user