Skip to content

Commit

Permalink
Update SN easter egg (untested xdx)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexejhero committed Nov 6, 2023
1 parent afa0f91 commit 7293da1
Show file tree
Hide file tree
Showing 14 changed files with 181 additions and 1 deletion.
34 changes: 34 additions & 0 deletions SCHIZO/Credits/EasterEggManager.Subnautica.cs
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.

15 changes: 15 additions & 0 deletions Unity/Assets/Credits/Credits.asset
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: []
8 changes: 8 additions & 0 deletions Unity/Assets/Credits/Credits.asset.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Unity/Assets/Credits/Easter Egg SN.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions Unity/Assets/Credits/Easter Egg SN/Easter Egg SN.asset
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}
8 changes: 8 additions & 0 deletions Unity/Assets/Credits/Easter Egg SN/Easter Egg SN.asset.meta

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
@@ -1,5 +1,21 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-8803900663392446776
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: 7e5191dfd75c432c9713c5321302eadd, type: 3}
m_Name: SN Easter Egg (SFXNoFilter)
m_EditorClassIdentifier:
path:
id:
collection: {fileID: 11400000}
bus: 4
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down
46 changes: 46 additions & 0 deletions Unity/Assets/Credits/Easter Egg SN/SNEasterEgg.prefab
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}
7 changes: 7 additions & 0 deletions Unity/Assets/Credits/Easter Egg SN/SNEasterEgg.prefab.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Unity/Assets/Scripts/SCHIZO/Credits.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions Unity/Assets/Scripts/SCHIZO/Credits/EasterEggManager.cs
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;
}
}
3 changes: 3 additions & 0 deletions Unity/Assets/Scripts/SCHIZO/Credits/EasterEggManager.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7293da1

Please sign in to comment.