mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 12:47:38 +02:00
Game Overlays (#280)
* add accuracy display * temp BG for show * separate overlays prefab make proper shader for star effects * aim shakiness display * implement testing skill star * fully functional skill star * separate section display from editor * fully separate chart section display from timeline * add section to overlays * fix nullreference issues * start game layout settings * add game settings script * fix nonfunctioning scoring * invert y position logic on timing bar * add perfect challenge functionality * fix section not showing up in editor add perfect challenge option * add timing display minimal mode * Update PerfectAndPractice.png * show gismo for minigame bounds in editor * add ability to disable overlays in editor * prepare medals add new timing display graphic * hide screen preview * per-axis camera control added per request * section medals basic functionality * add medal get animations * fix bug with perfect icons * visual enhancements * adjust look of timing display minmode address audio ducking issues(?) * prepare overlay lyt editor add viewport pan, rotate, scale adjust audio setting * add layout editor UI elements * dynamic overlay creation * fix default single timing disp * set up overlay settings controls * start UI events * runtime uuid for component reference * layout editor affects overlay elements * show overlay element previews while editing * advanced audio settings * fix bug in drop-down creation * fallback defaults for the new stuff * fix textbox & overlay visibility bugs
This commit is contained in:
@ -6,6 +6,8 @@ using DG.Tweening;
|
||||
using HeavenStudio.Util;
|
||||
using Starpelly;
|
||||
|
||||
using HeavenStudio.Common;
|
||||
|
||||
namespace HeavenStudio.Games
|
||||
{
|
||||
|
||||
@ -62,6 +64,7 @@ namespace HeavenStudio.Games
|
||||
|
||||
if (noAutoplay && autoplayOnly) autoplayOnly = false;
|
||||
if (noAutoplay && triggersAutoplay){ triggersAutoplay = false; }
|
||||
if (!enabled) return;
|
||||
|
||||
double normalizedTime = GetNormalizedTime();
|
||||
double stateProg = ((normalizedTime - Minigame.PerfectTime()) / (Minigame.LateTime() - Minigame.PerfectTime()) - 0.5f) * 2;
|
||||
@ -161,9 +164,20 @@ namespace HeavenStudio.Games
|
||||
GameManager.instance.AvgInputOffset = offset;
|
||||
OnHit(this, (float) state);
|
||||
|
||||
if (countsForAccuracy && !(noAutoplay || autoplayOnly) && isEligible)
|
||||
GameManager.instance.ScoreInputAccuracy(TimeToAccuracy(time), time > 1.0, 1.0);
|
||||
CleanUp();
|
||||
if (countsForAccuracy && !(noAutoplay || autoplayOnly) && isEligible)
|
||||
{
|
||||
GameManager.instance.ScoreInputAccuracy(TimeToAccuracy(time), time > 1.0, time);
|
||||
if (state >= 1f || state <= -1f)
|
||||
{
|
||||
GoForAPerfect.instance.Miss();
|
||||
SectionMedalsManager.instance.MakeIneligible();
|
||||
}
|
||||
else
|
||||
{
|
||||
GoForAPerfect.instance.Hit();
|
||||
}
|
||||
}
|
||||
} else
|
||||
{
|
||||
Blank();
|
||||
@ -176,7 +190,6 @@ namespace HeavenStudio.Games
|
||||
if (time >= Minigame.AceStartTime() && time <= Minigame.AceEndTime())
|
||||
{
|
||||
// Ace
|
||||
Debug.Log("Accuracy (Ace): " + 1.0);
|
||||
return 1.0;
|
||||
}
|
||||
|
||||
@ -190,7 +203,6 @@ namespace HeavenStudio.Games
|
||||
state = 1.0 - ((time - Minigame.AceEndTime()) / (Minigame.LateTime() - Minigame.AceEndTime()));
|
||||
state *= 1.0 - Minigame.rankHiThreshold;
|
||||
state += Minigame.rankHiThreshold;
|
||||
Debug.Log("Accuracy (Late): " + state);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -198,7 +210,6 @@ namespace HeavenStudio.Games
|
||||
state = ((time - Minigame.PerfectTime()) / (Minigame.AceStartTime() - Minigame.PerfectTime()));
|
||||
state *= 1.0 - Minigame.rankHiThreshold;
|
||||
state += Minigame.rankHiThreshold;
|
||||
Debug.Log("Accuracy (Early): " + state);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -208,14 +219,12 @@ namespace HeavenStudio.Games
|
||||
// late half of timing window
|
||||
state = 1.0 - ((time - Minigame.LateTime()) / (Minigame.EndTime() - Minigame.LateTime()));
|
||||
state *= Minigame.rankOkThreshold;
|
||||
Debug.Log("Accuracy (Late NG): " + state);
|
||||
}
|
||||
else
|
||||
{
|
||||
//early half of timing window
|
||||
state = ((time - Minigame.PerfectTime()) / (Minigame.AceStartTime() - Minigame.PerfectTime()));
|
||||
state *= Minigame.rankOkThreshold;
|
||||
Debug.Log("Accuracy (Early NG): " + state);
|
||||
}
|
||||
}
|
||||
return state;
|
||||
@ -230,7 +239,11 @@ namespace HeavenStudio.Games
|
||||
|
||||
CleanUp();
|
||||
if (countsForAccuracy && !(noAutoplay || autoplayOnly))
|
||||
GameManager.instance.ScoreInputAccuracy(0, true, 1.0);
|
||||
{
|
||||
GameManager.instance.ScoreInputAccuracy(0, true, 2.0, 1.0, false);
|
||||
GoForAPerfect.instance.Miss();
|
||||
SectionMedalsManager.instance.MakeIneligible();
|
||||
}
|
||||
}
|
||||
|
||||
public void Blank()
|
||||
|
Reference in New Issue
Block a user