Compare commits
3 Commits
7cdc8fab22
...
bb6059a885
| Author | SHA1 | Date | |
|---|---|---|---|
| bb6059a885 | |||
|
|
74339d7c47 | ||
| 78fad26ff5 |
8
Assets/Resources/Fonts/Æblerup Font.meta
Normal file
8
Assets/Resources/Fonts/Æblerup Font.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c4d9cb72b0216fb47ba3efd865e7ba61
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Resources/Fonts/Æblerup Font/AppleHills01.ttf
Normal file
BIN
Assets/Resources/Fonts/Æblerup Font/AppleHills01.ttf
Normal file
Binary file not shown.
21
Assets/Resources/Fonts/Æblerup Font/AppleHills01.ttf.meta
Normal file
21
Assets/Resources/Fonts/Æblerup Font/AppleHills01.ttf.meta
Normal file
@@ -0,0 +1,21 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0308f8a42572b354e820e31ec96b177c
|
||||
TrueTypeFontImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 4
|
||||
fontSize: 16
|
||||
forceTextureCase: -2
|
||||
characterSpacing: 0
|
||||
characterPadding: 1
|
||||
includeFontData: 1
|
||||
fontNames:
|
||||
- Trafalgar_2
|
||||
fallbackFontReferences: []
|
||||
customCharacters:
|
||||
fontRenderingMode: 0
|
||||
ascentCalculationMode: 1
|
||||
useLegacyBoundsCalculation: 0
|
||||
shouldRoundAdvanceValue: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Resources/Fonts/Æblerup Font/AppleHills02.ttf
Normal file
BIN
Assets/Resources/Fonts/Æblerup Font/AppleHills02.ttf
Normal file
Binary file not shown.
21
Assets/Resources/Fonts/Æblerup Font/AppleHills02.ttf.meta
Normal file
21
Assets/Resources/Fonts/Æblerup Font/AppleHills02.ttf.meta
Normal file
@@ -0,0 +1,21 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6d65e7e8f5789654f852ad213fda2393
|
||||
TrueTypeFontImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 4
|
||||
fontSize: 16
|
||||
forceTextureCase: -2
|
||||
characterSpacing: 0
|
||||
characterPadding: 1
|
||||
includeFontData: 1
|
||||
fontNames:
|
||||
- Trafalgar_3
|
||||
fallbackFontReferences: []
|
||||
customCharacters:
|
||||
fontRenderingMode: 0
|
||||
ascentCalculationMode: 1
|
||||
useLegacyBoundsCalculation: 0
|
||||
shouldRoundAdvanceValue: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Resources/Fonts/Æblerup Font/AppleHills03.ttf
Normal file
BIN
Assets/Resources/Fonts/Æblerup Font/AppleHills03.ttf
Normal file
Binary file not shown.
21
Assets/Resources/Fonts/Æblerup Font/AppleHills03.ttf.meta
Normal file
21
Assets/Resources/Fonts/Æblerup Font/AppleHills03.ttf.meta
Normal file
@@ -0,0 +1,21 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 695b6b4991951e74db42310b26cf490e
|
||||
TrueTypeFontImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 4
|
||||
fontSize: 16
|
||||
forceTextureCase: -2
|
||||
characterSpacing: 0
|
||||
characterPadding: 1
|
||||
includeFontData: 1
|
||||
fontNames:
|
||||
- Trafalgar_4
|
||||
fallbackFontReferences: []
|
||||
customCharacters:
|
||||
fontRenderingMode: 0
|
||||
ascentCalculationMode: 1
|
||||
useLegacyBoundsCalculation: 0
|
||||
shouldRoundAdvanceValue: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Resources/Fonts/Æblerup Font/AppleHills04.ttf
Normal file
BIN
Assets/Resources/Fonts/Æblerup Font/AppleHills04.ttf
Normal file
Binary file not shown.
21
Assets/Resources/Fonts/Æblerup Font/AppleHills04.ttf.meta
Normal file
21
Assets/Resources/Fonts/Æblerup Font/AppleHills04.ttf.meta
Normal file
@@ -0,0 +1,21 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 09a5e2ee29c2fa4468d79f36b7b725f6
|
||||
TrueTypeFontImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 4
|
||||
fontSize: 16
|
||||
forceTextureCase: -2
|
||||
characterSpacing: 0
|
||||
characterPadding: 1
|
||||
includeFontData: 1
|
||||
fontNames:
|
||||
- Trafalgar_NEW
|
||||
fallbackFontReferences: []
|
||||
customCharacters:
|
||||
fontRenderingMode: 0
|
||||
ascentCalculationMode: 1
|
||||
useLegacyBoundsCalculation: 0
|
||||
shouldRoundAdvanceValue: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -66,21 +66,17 @@ namespace Minigames.DivingForPictures
|
||||
|
||||
SetNextSpawnInterval();
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
DivingGameManager.Instance.RegisterPausableComponent(this);
|
||||
}
|
||||
|
||||
|
||||
void Start()
|
||||
{
|
||||
// Start spawning if not paused
|
||||
DivingGameManager.Instance.RegisterPausableComponent(this);
|
||||
StartSpawningCoroutine();
|
||||
}
|
||||
|
||||
void OnDestroy()
|
||||
{
|
||||
DivingGameManager.Instance.UnregisterPausableComponent(this);
|
||||
DivingGameManager.Instance?.UnregisterPausableComponent(this);
|
||||
|
||||
// Clean up any active coroutines
|
||||
StopAllCoroutines();
|
||||
|
||||
@@ -98,24 +98,10 @@ namespace Minigames.DivingForPictures
|
||||
public event Action<Monster, float> OnPhotoSequenceCompleted; // Now includes proximity score
|
||||
public event Action<float> OnPhotoSequenceProgressUpdated;
|
||||
|
||||
private static DivingGameManager _instance;
|
||||
private static DivingGameManager _instance = null;
|
||||
private static bool _isQuitting = false;
|
||||
public static DivingGameManager Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_instance == null && Application.isPlaying && !_isQuitting)
|
||||
{
|
||||
_instance = FindAnyObjectByType<DivingGameManager>();
|
||||
if (_instance == null)
|
||||
{
|
||||
var go = new GameObject("DivingGameManager");
|
||||
_instance = go.AddComponent<DivingGameManager>();
|
||||
}
|
||||
}
|
||||
return _instance;
|
||||
}
|
||||
}
|
||||
|
||||
public static DivingGameManager Instance => _instance;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
|
||||
@@ -29,8 +29,11 @@ namespace Minigames.DivingForPictures
|
||||
private void OnDestroy()
|
||||
{
|
||||
// Unsubscribe from events
|
||||
DivingGameManager.Instance.OnScoreChanged -= UpdateScoreDisplay;
|
||||
DivingGameManager.Instance.OnPictureTaken -= ShowScorePopup;
|
||||
if (DivingGameManager.Instance)
|
||||
{
|
||||
DivingGameManager.Instance.OnScoreChanged -= UpdateScoreDisplay;
|
||||
DivingGameManager.Instance.OnPictureTaken -= ShowScorePopup;
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateScoreDisplay(int score)
|
||||
|
||||
@@ -82,17 +82,13 @@ namespace Minigames.DivingForPictures
|
||||
if (onObstacleDestroyed == null)
|
||||
onObstacleDestroyed = new UnityEvent<GameObject>();
|
||||
}
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
// Register with the DivingGameManager for pause/resume events
|
||||
DivingGameManager.Instance.RegisterPausableComponent(this);
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
// Register with the DivingGameManager for pause/resume events
|
||||
DivingGameManager.Instance.RegisterPausableComponent(this);
|
||||
DivingGameManager.Instance.OnGameInitialized += Initialize;
|
||||
|
||||
|
||||
// If game is already initialized, initialize immediately
|
||||
if (DivingGameManager.Instance.GetType().GetField("_isGameInitialized",
|
||||
System.Reflection.BindingFlags.NonPublic |
|
||||
@@ -104,7 +100,7 @@ namespace Minigames.DivingForPictures
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
DivingGameManager.Instance.UnregisterPausableComponent(this);
|
||||
DivingGameManager.Instance?.UnregisterPausableComponent(this);
|
||||
|
||||
// Clean up any active coroutines
|
||||
StopAllCoroutines();
|
||||
|
||||
@@ -42,15 +42,12 @@ namespace Minigames.DivingForPictures.Player
|
||||
Debug.LogError("[PlayerController] Failed to load diving minigame settings!");
|
||||
}
|
||||
}
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
// Register as a pausable component with DivingGameManager
|
||||
DivingGameManager.Instance.RegisterPausableComponent(this);
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
// Register as a pausable component with DivingGameManager
|
||||
DivingGameManager.Instance.RegisterPausableComponent(this);
|
||||
|
||||
// Initialize target to current position
|
||||
targetFingerX = transform.position.x;
|
||||
isTouchActive = false;
|
||||
@@ -114,10 +111,11 @@ namespace Minigames.DivingForPictures.Player
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
DivingGameManager.Instance.OnGameInitialized -= Initialize;
|
||||
|
||||
// Unregister as a pausable component
|
||||
DivingGameManager.Instance.UnregisterPausableComponent(this);
|
||||
if (DivingGameManager.Instance)
|
||||
{
|
||||
DivingGameManager.Instance.OnGameInitialized -= Initialize;
|
||||
DivingGameManager.Instance.UnregisterPausableComponent(this);
|
||||
}
|
||||
|
||||
// Unsubscribe from edge anchor events
|
||||
if (edgeAnchor != null)
|
||||
|
||||
@@ -168,14 +168,10 @@ namespace Minigames.DivingForPictures
|
||||
}
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
private void Start()
|
||||
{
|
||||
// Register with the DivingGameManager for pause/resume events
|
||||
DivingGameManager.Instance.RegisterPausableComponent(this);
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
DivingGameManager.Instance.OnGameInitialized += Initialize;
|
||||
|
||||
// If game is already initialized, initialize immediately
|
||||
@@ -189,7 +185,7 @@ namespace Minigames.DivingForPictures
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
DivingGameManager.Instance.UnregisterPausableComponent(this);
|
||||
DivingGameManager.Instance?.UnregisterPausableComponent(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace Minigames.DivingForPictures.Utilities
|
||||
|
||||
private bool isPaused = false;
|
||||
|
||||
private void OnEnable()
|
||||
private void Start()
|
||||
{
|
||||
DivingGameManager.Instance.RegisterPausableComponent(this);
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Minigames.DivingForPictures.Utilities
|
||||
|
||||
private bool isPaused = false;
|
||||
|
||||
private void OnEnable()
|
||||
private void Start()
|
||||
{
|
||||
DivingGameManager.Instance.RegisterPausableComponent(this);
|
||||
}
|
||||
|
||||
@@ -9,12 +9,6 @@ public class DivingGameOverScreen : MonoBehaviour
|
||||
[SerializeField]
|
||||
private TextMeshProUGUI finalScoreText;
|
||||
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
if (DivingGameManager.Instance != null)
|
||||
|
||||
@@ -26,9 +26,9 @@ MonoBehaviour:
|
||||
spawnCooldown: 5
|
||||
basePoints: 100
|
||||
depthMultiplier: 10
|
||||
speedTransitionDuration: 2
|
||||
speedTransitionDuration: 3
|
||||
surfacingSpeedFactor: 6
|
||||
surfacingSpawnDelay: 5
|
||||
surfacingSpawnDelay: 2
|
||||
referenceScreenHeight: 1920
|
||||
initialTileCount: 3
|
||||
tileSpawnBuffer: 2
|
||||
|
||||
Reference in New Issue
Block a user