Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 73 additions & 4 deletions Assets/Prefabs/Gameplay/HUD/Pause/QuickPlayPause.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,9 @@ PrefabInstance:
- targetCorrespondingSourceObject: {fileID: 8918172421510936374, guid: d0426e4d1cafc1c489d1df380508ec96, type: 3}
insertIndex: -1
addedObject: {fileID: 5062416941184210017}
- targetCorrespondingSourceObject: {fileID: 8918172421510936374, guid: d0426e4d1cafc1c489d1df380508ec96, type: 3}
insertIndex: -1
addedObject: {fileID: 7300000000000000002}
- targetCorrespondingSourceObject: {fileID: 8918172421510936374, guid: d0426e4d1cafc1c489d1df380508ec96, type: 3}
insertIndex: -1
addedObject: {fileID: 567501787953327268}
Expand Down Expand Up @@ -597,7 +600,7 @@ PrefabInstance:
- target: {fileID: 6846856529861592900, guid: 0e2af23c2e7465444a3fb84a06d425ae,
type: 3}
propertyPath: m_RootOrder
value: 5
value: 6
objectReference: {fileID: 0}
- target: {fileID: 6846856529861592900, guid: 0e2af23c2e7465444a3fb84a06d425ae,
type: 3}
Expand Down Expand Up @@ -771,7 +774,7 @@ PrefabInstance:
- target: {fileID: 6846856529861592900, guid: 0e2af23c2e7465444a3fb84a06d425ae,
type: 3}
propertyPath: m_RootOrder
value: 4
value: 5
objectReference: {fileID: 0}
- target: {fileID: 6846856529861592900, guid: 0e2af23c2e7465444a3fb84a06d425ae,
type: 3}
Expand Down Expand Up @@ -945,7 +948,7 @@ PrefabInstance:
- target: {fileID: 6846856529861592900, guid: 0e2af23c2e7465444a3fb84a06d425ae,
type: 3}
propertyPath: m_RootOrder
value: 3
value: 4
objectReference: {fileID: 0}
- target: {fileID: 6846856529861592900, guid: 0e2af23c2e7465444a3fb84a06d425ae,
type: 3}
Expand Down Expand Up @@ -1119,7 +1122,7 @@ PrefabInstance:
- target: {fileID: 6846856529861592900, guid: 0e2af23c2e7465444a3fb84a06d425ae,
type: 3}
propertyPath: m_RootOrder
value: 2
value: 3
objectReference: {fileID: 0}
- target: {fileID: 6846856529861592900, guid: 0e2af23c2e7465444a3fb84a06d425ae,
type: 3}
Expand Down Expand Up @@ -1226,3 +1229,69 @@ RectTransform:
m_CorrespondingSourceObject: {fileID: 6846856529861592900, guid: 0e2af23c2e7465444a3fb84a06d425ae, type: 3}
m_PrefabInstance: {fileID: 6405456098411523040}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &7300000000000000001
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 6546681381847009475}
m_Modifications:
- target: {fileID: 2001797702105249370, guid: 0e2af23c2e7465444a3fb84a06d425ae, type: 3}
propertyPath: _localizationKey
value: Menu.Pause.Generic.SkipToScoreScreen
objectReference: {fileID: 0}
- target: {fileID: 5535251001142144674, guid: 0e2af23c2e7465444a3fb84a06d425ae, type: 3}
propertyPath: _onClick.m_PersistentCalls.m_Calls.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5535251001142144674, guid: 0e2af23c2e7465444a3fb84a06d425ae, type: 3}
propertyPath: _onClick.m_PersistentCalls.m_Calls.Array.data[0].m_Mode
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5535251001142144674, guid: 0e2af23c2e7465444a3fb84a06d425ae, type: 3}
propertyPath: _onClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
objectReference: {fileID: 8577779909696170055}
- target: {fileID: 5535251001142144674, guid: 0e2af23c2e7465444a3fb84a06d425ae, type: 3}
propertyPath: _onClick.m_PersistentCalls.m_Calls.Array.data[0].m_CallState
value: 2
objectReference: {fileID: 0}
- target: {fileID: 5535251001142144674, guid: 0e2af23c2e7465444a3fb84a06d425ae, type: 3}
propertyPath: _onClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
value: SkipToScoreScreen
objectReference: {fileID: 0}
- target: {fileID: 5535251001142144674, guid: 0e2af23c2e7465444a3fb84a06d425ae, type: 3}
propertyPath: _onClick.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName
value: YARG.Gameplay.HUD.GenericPause, Assembly-CSharp
objectReference: {fileID: 0}
- target: {fileID: 5535251001142144674, guid: 0e2af23c2e7465444a3fb84a06d425ae, type: 3}
propertyPath: _onClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName
value: UnityEngine.Object, UnityEngine
objectReference: {fileID: 0}
- target: {fileID: 6846856528720448031, guid: 0e2af23c2e7465444a3fb84a06d425ae, type: 3}
propertyPath: m_text
value: Skip to Score Screen
objectReference: {fileID: 0}
- target: {fileID: 6846856529861592900, guid: 0e2af23c2e7465444a3fb84a06d425ae, type: 3}
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
- target: {fileID: 6846856529861592900, guid: 0e2af23c2e7465444a3fb84a06d425ae, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6846856529861592903, guid: 0e2af23c2e7465444a3fb84a06d425ae, type: 3}
propertyPath: m_Name
value: Skip to Score Screen
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 0e2af23c2e7465444a3fb84a06d425ae, type: 3}
--- !u!224 &7300000000000000002 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 6846856529861592900, guid: 0e2af23c2e7465444a3fb84a06d425ae, type: 3}
m_PrefabInstance: {fileID: 7300000000000000001}
m_PrefabAsset: {fileID: 0}
75 changes: 72 additions & 3 deletions Assets/Prefabs/Gameplay/HUD/Pause/SetlistPause.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ PrefabInstance:
- target: {fileID: 6846856529861592900, guid: 0e2af23c2e7465444a3fb84a06d425ae,
type: 3}
propertyPath: m_RootOrder
value: 3
value: 4
objectReference: {fileID: 0}
- target: {fileID: 6846856529861592900, guid: 0e2af23c2e7465444a3fb84a06d425ae, type: 3}
propertyPath: m_AnchorMax.x
Expand Down Expand Up @@ -242,7 +242,7 @@ PrefabInstance:
- target: {fileID: 6846856529861592900, guid: 0e2af23c2e7465444a3fb84a06d425ae,
type: 3}
propertyPath: m_RootOrder
value: 4
value: 5
objectReference: {fileID: 0}
- target: {fileID: 6846856529861592900, guid: 0e2af23c2e7465444a3fb84a06d425ae,
type: 3}
Expand Down Expand Up @@ -495,6 +495,9 @@ PrefabInstance:
- targetCorrespondingSourceObject: {fileID: 8918172421510936374, guid: d0426e4d1cafc1c489d1df380508ec96, type: 3}
insertIndex: -1
addedObject: {fileID: 3160656958356024644}
- targetCorrespondingSourceObject: {fileID: 8918172421510936374, guid: d0426e4d1cafc1c489d1df380508ec96, type: 3}
insertIndex: -1
addedObject: {fileID: 7400000000000000002}
- targetCorrespondingSourceObject: {fileID: 8918172421510936374, guid: d0426e4d1cafc1c489d1df380508ec96, type: 3}
insertIndex: -1
addedObject: {fileID: 4334003084230768327}
Expand Down Expand Up @@ -769,7 +772,7 @@ PrefabInstance:
- target: {fileID: 6846856529861592900, guid: 0e2af23c2e7465444a3fb84a06d425ae,
type: 3}
propertyPath: m_RootOrder
value: 2
value: 3
objectReference: {fileID: 0}
- target: {fileID: 6846856529861592900, guid: 0e2af23c2e7465444a3fb84a06d425ae, type: 3}
propertyPath: m_AnchorMax.x
Expand Down Expand Up @@ -1045,3 +1048,69 @@ RectTransform:
m_CorrespondingSourceObject: {fileID: 6846856529861592900, guid: 0e2af23c2e7465444a3fb84a06d425ae, type: 3}
m_PrefabInstance: {fileID: 8419483339342981632}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &7400000000000000001
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 4006097793316972377}
m_Modifications:
- target: {fileID: 2001797702105249370, guid: 0e2af23c2e7465444a3fb84a06d425ae, type: 3}
propertyPath: _localizationKey
value: Menu.Pause.Generic.SkipToScoreScreen
objectReference: {fileID: 0}
- target: {fileID: 5535251001142144674, guid: 0e2af23c2e7465444a3fb84a06d425ae, type: 3}
propertyPath: _onClick.m_PersistentCalls.m_Calls.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5535251001142144674, guid: 0e2af23c2e7465444a3fb84a06d425ae, type: 3}
propertyPath: _onClick.m_PersistentCalls.m_Calls.Array.data[0].m_Mode
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5535251001142144674, guid: 0e2af23c2e7465444a3fb84a06d425ae, type: 3}
propertyPath: _onClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
objectReference: {fileID: 4849977719010318057}
- target: {fileID: 5535251001142144674, guid: 0e2af23c2e7465444a3fb84a06d425ae, type: 3}
propertyPath: _onClick.m_PersistentCalls.m_Calls.Array.data[0].m_CallState
value: 2
objectReference: {fileID: 0}
- target: {fileID: 5535251001142144674, guid: 0e2af23c2e7465444a3fb84a06d425ae, type: 3}
propertyPath: _onClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
value: SkipToScoreScreen
objectReference: {fileID: 0}
- target: {fileID: 5535251001142144674, guid: 0e2af23c2e7465444a3fb84a06d425ae, type: 3}
propertyPath: _onClick.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName
value: YARG.Gameplay.HUD.GenericPause, Assembly-CSharp
objectReference: {fileID: 0}
- target: {fileID: 5535251001142144674, guid: 0e2af23c2e7465444a3fb84a06d425ae, type: 3}
propertyPath: _onClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName
value: UnityEngine.Object, UnityEngine
objectReference: {fileID: 0}
- target: {fileID: 6846856528720448031, guid: 0e2af23c2e7465444a3fb84a06d425ae, type: 3}
propertyPath: m_text
value: Skip to Score Screen
objectReference: {fileID: 0}
- target: {fileID: 6846856529861592900, guid: 0e2af23c2e7465444a3fb84a06d425ae, type: 3}
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
- target: {fileID: 6846856529861592900, guid: 0e2af23c2e7465444a3fb84a06d425ae, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6846856529861592903, guid: 0e2af23c2e7465444a3fb84a06d425ae, type: 3}
propertyPath: m_Name
value: Skip to Score Screen
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 0e2af23c2e7465444a3fb84a06d425ae, type: 3}
--- !u!224 &7400000000000000002 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 6846856529861592900, guid: 0e2af23c2e7465444a3fb84a06d425ae, type: 3}
m_PrefabInstance: {fileID: 7400000000000000001}
m_PrefabAsset: {fileID: 0}
53 changes: 50 additions & 3 deletions Assets/Script/Gameplay/GameManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,54 @@ public bool OverrideResume()
public double GetRelativeInputTime(double timeFromInputSystem)
=> _songRunner.GetRelativeInputTime(timeFromInputSystem);

private bool EndSong()
public void SkipToScoreScreen()
{
double endTime = Math.Max(SongLength, LastNoteTime) + SONG_END_DELAY;
const double simulationStep = 1.0 / 60.0;
double simulationEndTime = LastNoteTime + SONG_END_DELAY;
double simulationTime = _players.Count > 0
? Math.Max(_songRunner.InputTime, _players.Max(player => player.BaseEngine.CurrentTime))
: _songRunner.InputTime;

// Advance all engines together so band failure is evaluated the same way as
// normal gameplay, while queuing no additional player inputs.
while (simulationTime < simulationEndTime && !PlayerHasFailed)
{
simulationTime = Math.Min(simulationTime + simulationStep, simulationEndTime);
EngineManager.UpdateEngines(simulationTime);
}

if (PlayerHasFailed)
{
SetSongTime(simulationTime, 0);
_pauseMenu.PopAllMenus();
Time.timeScale = 1f;
return;
}

// Resolve any non-note state that extends through a long outro without
// simulating every empty frame.
if (simulationTime < endTime)
{
EngineManager.UpdateEngines(endTime);
}

if (PlayerHasFailed)
{
SetSongTime(endTime, 0);
_pauseMenu.PopAllMenus();
Time.timeScale = 1f;
return;
}

BandScore = _players.Sum(player => player.Score + player.BandBonusScore);
EngineManager.UpdateStars();

_pauseMenu.PopAllMenus();
EndSong(endTime);
}

private bool EndSong(double? forcedEndTime = null)
{
// Dispose the crowd handler
CrowdEventHandler.Dispose();
Expand All @@ -599,7 +646,7 @@ private bool EndSong()
return false;
}

if (_songRunner.SongTime < SongLength + SONG_END_DELAY)
if (forcedEndTime is null && _songRunner.SongTime < SongLength + SONG_END_DELAY)
{
return false;
}
Expand All @@ -615,7 +662,7 @@ private bool EndSong()
try
{
_isReplaySaved = false;
replayInfo = SaveReplay(_songRunner.InputTime, ScoreContainer.ScoreReplayDirectory);
replayInfo = SaveReplay(forcedEndTime ?? _songRunner.InputTime, ScoreContainer.ScoreReplayDirectory);
}
catch (Exception e)
{
Expand Down
5 changes: 5 additions & 0 deletions Assets/Script/Gameplay/HUD/Pause/GenericPause.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ public void BackToLibrary()
PauseMenuManager.Quit();
}

public void SkipToScoreScreen()
{
GameManager.SkipToScoreScreen();
}

public void OpenQuickSettings()
{
PauseMenuManager.PushMenu(PauseMenuManager.Menu.QuickSettings);
Expand Down
1 change: 1 addition & 0 deletions Assets/StreamingAssets/lang/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,7 @@
"Generic": {
"Resume": "Resume",
"Restart": "Restart",
"SkipToScoreScreen": "Skip to Score Screen",
"BackToLibrary": "Back To Library",
"Settings": "Settings",
"Practice": "Practice"
Expand Down