Author | SHA1 | Message | Date |
---|---|---|---|
Joshua Reason | a29d2c258f | Merge branch 'main' of https://git.joshuareason.com/Jam/GGJ_2023 | 1 year ago |
Joshua Reason | a93d8ee94b | Added main rain + return button | 1 year ago |
Joshua Reason | 9361f04bfe | Merge branch 'main' of https://git.joshuareason.com/Jam/GGJ_2023 | 1 year ago |
Joshua Reason | cf27aa5e4a | Added rain to menu | 1 year ago |
Joshua Reason | 0e0882519e | Merge branch 'main' of https://git.joshuareason.com/Jam/GGJ_2023 | 1 year ago |
Joshua Reason | 35e4e2dca0 | Added music to menu | 1 year ago |
Joshua Reason | 3a71886073 | Merge branch 'main' of https://git.joshuareason.com/Jam/GGJ_2023 | 1 year ago |
Joshua Reason | 8122c6694a | Tag looks in parent | 1 year ago |
Joshua Reason | be2402e05f | DontDestroyOnLoad | 1 year ago |
size 24397 |
size 84015 |
size 701565 |
@ -0,0 +1,68 @@ | |||||
using System.Collections; | |||||
using System.Collections.Generic; | |||||
using UnityEngine; | |||||
using NaughtyAttributes; | |||||
/// <summary> | |||||
/// | |||||
/// </summary> | |||||
public class DontDestroyOnLoad : MonoBehaviour | |||||
{ | |||||
#region Inspector Fields | |||||
#endregion Inspector Fields | |||||
#region Private Fields | |||||
#endregion Private Fields | |||||
#region Getters | |||||
#endregion Getters | |||||
#region MonoBehaviour Functions | |||||
/// <summary> | |||||
/// OnEnable is called when the object becomes enabled and active. | |||||
/// </summary> | |||||
private void OnEnable() | |||||
{ | |||||
DontDestroyOnLoad(transform.root.gameObject); | |||||
} | |||||
/// <summary> | |||||
/// OnDisable is called when the behaviour becomes disabled. | |||||
/// </summary> | |||||
private void OnDisable() | |||||
{ | |||||
} | |||||
/// <summary> | |||||
/// Update is called once per frame | |||||
/// </summary> | |||||
private void Update() | |||||
{ | |||||
} | |||||
#endregion MonoBehaviour Functions | |||||
#region Class Functionality | |||||
#endregion Class Functionality | |||||
#region Editor Functions | |||||
/// <summary> | |||||
/// Called when the Component is created or Reset from the Inspector | |||||
/// </summary> | |||||
private void Reset() | |||||
{ | |||||
//useful for finding components on creation | |||||
} | |||||
#endregion Editor Functions | |||||
} |
@ -0,0 +1,11 @@ | |||||
fileFormatVersion: 2 | |||||
guid: b48b19a36ebb65f46aca5366979419a3 | |||||
MonoImporter: | |||||
externalObjects: {} | |||||
serializedVersion: 2 | |||||
defaultReferences: [] | |||||
executionOrder: 0 | |||||
icon: {instanceID: 0} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,29 @@ | |||||
using System.Collections; | |||||
using System.Collections.Generic; | |||||
using UnityEngine; | |||||
using NaughtyAttributes; | |||||
/// <summary> | |||||
/// | |||||
/// </summary> | |||||
public static class GameObjectExtension | |||||
{ | |||||
public static bool isTagInParent(this GameObject go, string tag) | |||||
{ | |||||
Transform current = go.transform; | |||||
while (current != null) | |||||
{ | |||||
if (current.gameObject.CompareTag(tag)) | |||||
return true; | |||||
current = current.parent; | |||||
} | |||||
return false; | |||||
} | |||||
} |
@ -0,0 +1,11 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 372b54ac7f1e6564993301c9b3a0cb22 | |||||
MonoImporter: | |||||
externalObjects: {} | |||||
serializedVersion: 2 | |||||
defaultReferences: [] | |||||
executionOrder: 0 | |||||
icon: {instanceID: 0} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
size 537679 |
size 455 |