-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using UnityEngine; | ||
|
||
namespace SCHIZO.Credits; | ||
|
||
partial class EasterEggManager | ||
{ | ||
private EndCreditsManager _credits; | ||
private bool _easterEggAdjusted; | ||
|
||
private void Awake() | ||
{ | ||
_credits = GetComponentInParent<EndCreditsManager>(); | ||
} | ||
|
||
private void Update() | ||
{ | ||
if (_credits.phase != EndCreditsManager.Phase.Easter || EndCreditsManager.showEaster) return; | ||
|
||
if (!_easterEggAdjusted) | ||
{ | ||
float startTime = _credits.phaseStartTime - Time.unscaledTime; | ||
|
||
sounds.Play2D(0, startTime); | ||
sounds.Play2D(1, startTime + 1.5f); | ||
sounds.Play2D(2, startTime + 3.0f); | ||
sounds.Play2D(3, startTime + 3.5f); | ||
|
||
// it's actually the end time (just for the easter egg phase) | ||
_credits.phaseStartTime += 5f; | ||
|
||
_easterEggAdjusted = true; | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
%YAML 1.1 | ||
%TAG !u! tag:unity3d.com,2011: | ||
--- !u!114 &11400000 | ||
MonoBehaviour: | ||
m_ObjectHideFlags: 0 | ||
m_CorrespondingSourceObject: {fileID: 0} | ||
m_PrefabInstance: {fileID: 0} | ||
m_PrefabAsset: {fileID: 0} | ||
m_GameObject: {fileID: 0} | ||
m_Enabled: 1 | ||
m_EditorHideFlags: 0 | ||
m_Script: {fileID: 11500000, guid: c08c4776b89c430d985e9557dc60112d, type: 3} | ||
m_Name: Credits | ||
m_EditorClassIdentifier: | ||
registryItems: [] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
%YAML 1.1 | ||
%TAG !u! tag:unity3d.com,2011: | ||
--- !u!114 &11400000 | ||
MonoBehaviour: | ||
m_ObjectHideFlags: 0 | ||
m_CorrespondingSourceObject: {fileID: 0} | ||
m_PrefabInstance: {fileID: 0} | ||
m_PrefabAsset: {fileID: 0} | ||
m_GameObject: {fileID: 0} | ||
m_Enabled: 1 | ||
m_EditorHideFlags: 0 | ||
m_Script: {fileID: 11500000, guid: 39f47c082d6147689e539c5e8f321c42, type: 3} | ||
m_Name: Easter Egg SN | ||
m_EditorClassIdentifier: | ||
isSingleton: 0 | ||
scanForExisting: 0 | ||
typeName: | ||
methodName: | ||
_isBaseType: 0 | ||
targetTypeName: | ||
mode: 1 | ||
prefab: {fileID: 0} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
%YAML 1.1 | ||
%TAG !u! tag:unity3d.com,2011: | ||
--- !u!1 &7802731415246289858 | ||
GameObject: | ||
m_ObjectHideFlags: 0 | ||
m_CorrespondingSourceObject: {fileID: 0} | ||
m_PrefabInstance: {fileID: 0} | ||
m_PrefabAsset: {fileID: 0} | ||
serializedVersion: 6 | ||
m_Component: | ||
- component: {fileID: 8947305604307472496} | ||
- component: {fileID: 8867204435382354172} | ||
m_Layer: 0 | ||
m_Name: SNEasterEgg | ||
m_TagString: Untagged | ||
m_Icon: {fileID: 0} | ||
m_NavMeshLayer: 0 | ||
m_StaticEditorFlags: 0 | ||
m_IsActive: 1 | ||
--- !u!4 &8947305604307472496 | ||
Transform: | ||
m_ObjectHideFlags: 0 | ||
m_CorrespondingSourceObject: {fileID: 0} | ||
m_PrefabInstance: {fileID: 0} | ||
m_PrefabAsset: {fileID: 0} | ||
m_GameObject: {fileID: 7802731415246289858} | ||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} | ||
m_LocalPosition: {x: 0, y: 0, z: 0} | ||
m_LocalScale: {x: 1, y: 1, z: 1} | ||
m_Children: [] | ||
m_Father: {fileID: 0} | ||
m_RootOrder: 0 | ||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} | ||
--- !u!114 &8867204435382354172 | ||
MonoBehaviour: | ||
m_ObjectHideFlags: 0 | ||
m_CorrespondingSourceObject: {fileID: 0} | ||
m_PrefabInstance: {fileID: 0} | ||
m_PrefabAsset: {fileID: 0} | ||
m_GameObject: {fileID: 7802731415246289858} | ||
m_Enabled: 1 | ||
m_EditorHideFlags: 0 | ||
m_Script: {fileID: 11500000, guid: 4f90605b99ab4f6193c6b6c1e242e33d, type: 3} | ||
m_Name: | ||
m_EditorClassIdentifier: | ||
sounds: {fileID: -8803900663392446776, guid: e6ed925d4af08f14695de2a4d40b3567, type: 2} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
using SCHIZO.Sounds.Collections; | ||
using UnityEngine; | ||
|
||
namespace SCHIZO.Credits | ||
{ | ||
public sealed partial class EasterEggManager : MonoBehaviour | ||
{ | ||
[SerializeField] private SoundCollectionInstance sounds; | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.