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:
|
||||||
@@ -67,20 +67,16 @@ namespace Minigames.DivingForPictures
|
|||||||
SetNextSpawnInterval();
|
SetNextSpawnInterval();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnEnable()
|
|
||||||
{
|
|
||||||
DivingGameManager.Instance.RegisterPausableComponent(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
// Start spawning if not paused
|
// Start spawning if not paused
|
||||||
|
DivingGameManager.Instance.RegisterPausableComponent(this);
|
||||||
StartSpawningCoroutine();
|
StartSpawningCoroutine();
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnDestroy()
|
void OnDestroy()
|
||||||
{
|
{
|
||||||
DivingGameManager.Instance.UnregisterPausableComponent(this);
|
DivingGameManager.Instance?.UnregisterPausableComponent(this);
|
||||||
|
|
||||||
// Clean up any active coroutines
|
// Clean up any active coroutines
|
||||||
StopAllCoroutines();
|
StopAllCoroutines();
|
||||||
|
|||||||
@@ -98,24 +98,10 @@ namespace Minigames.DivingForPictures
|
|||||||
public event Action<Monster, float> OnPhotoSequenceCompleted; // Now includes proximity score
|
public event Action<Monster, float> OnPhotoSequenceCompleted; // Now includes proximity score
|
||||||
public event Action<float> OnPhotoSequenceProgressUpdated;
|
public event Action<float> OnPhotoSequenceProgressUpdated;
|
||||||
|
|
||||||
private static DivingGameManager _instance;
|
private static DivingGameManager _instance = null;
|
||||||
private static bool _isQuitting = false;
|
private static bool _isQuitting = false;
|
||||||
public static DivingGameManager Instance
|
|
||||||
{
|
public static DivingGameManager Instance => _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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -29,9 +29,12 @@ namespace Minigames.DivingForPictures
|
|||||||
private void OnDestroy()
|
private void OnDestroy()
|
||||||
{
|
{
|
||||||
// Unsubscribe from events
|
// Unsubscribe from events
|
||||||
|
if (DivingGameManager.Instance)
|
||||||
|
{
|
||||||
DivingGameManager.Instance.OnScoreChanged -= UpdateScoreDisplay;
|
DivingGameManager.Instance.OnScoreChanged -= UpdateScoreDisplay;
|
||||||
DivingGameManager.Instance.OnPictureTaken -= ShowScorePopup;
|
DivingGameManager.Instance.OnPictureTaken -= ShowScorePopup;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void UpdateScoreDisplay(int score)
|
private void UpdateScoreDisplay(int score)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -83,14 +83,10 @@ namespace Minigames.DivingForPictures
|
|||||||
onObstacleDestroyed = new UnityEvent<GameObject>();
|
onObstacleDestroyed = new UnityEvent<GameObject>();
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnEnable()
|
private void Start()
|
||||||
{
|
{
|
||||||
// Register with the DivingGameManager for pause/resume events
|
// Register with the DivingGameManager for pause/resume events
|
||||||
DivingGameManager.Instance.RegisterPausableComponent(this);
|
DivingGameManager.Instance.RegisterPausableComponent(this);
|
||||||
}
|
|
||||||
|
|
||||||
private void Start()
|
|
||||||
{
|
|
||||||
DivingGameManager.Instance.OnGameInitialized += Initialize;
|
DivingGameManager.Instance.OnGameInitialized += Initialize;
|
||||||
|
|
||||||
// If game is already initialized, initialize immediately
|
// If game is already initialized, initialize immediately
|
||||||
@@ -104,7 +100,7 @@ namespace Minigames.DivingForPictures
|
|||||||
|
|
||||||
private void OnDestroy()
|
private void OnDestroy()
|
||||||
{
|
{
|
||||||
DivingGameManager.Instance.UnregisterPausableComponent(this);
|
DivingGameManager.Instance?.UnregisterPausableComponent(this);
|
||||||
|
|
||||||
// Clean up any active coroutines
|
// Clean up any active coroutines
|
||||||
StopAllCoroutines();
|
StopAllCoroutines();
|
||||||
|
|||||||
@@ -43,14 +43,11 @@ namespace Minigames.DivingForPictures.Player
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnEnable()
|
void Start()
|
||||||
{
|
{
|
||||||
// Register as a pausable component with DivingGameManager
|
// Register as a pausable component with DivingGameManager
|
||||||
DivingGameManager.Instance.RegisterPausableComponent(this);
|
DivingGameManager.Instance.RegisterPausableComponent(this);
|
||||||
}
|
|
||||||
|
|
||||||
void Start()
|
|
||||||
{
|
|
||||||
// Initialize target to current position
|
// Initialize target to current position
|
||||||
targetFingerX = transform.position.x;
|
targetFingerX = transform.position.x;
|
||||||
isTouchActive = false;
|
isTouchActive = false;
|
||||||
@@ -113,11 +110,12 @@ namespace Minigames.DivingForPictures.Player
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void OnDestroy()
|
private void OnDestroy()
|
||||||
|
{
|
||||||
|
if (DivingGameManager.Instance)
|
||||||
{
|
{
|
||||||
DivingGameManager.Instance.OnGameInitialized -= Initialize;
|
DivingGameManager.Instance.OnGameInitialized -= Initialize;
|
||||||
|
|
||||||
// Unregister as a pausable component
|
|
||||||
DivingGameManager.Instance.UnregisterPausableComponent(this);
|
DivingGameManager.Instance.UnregisterPausableComponent(this);
|
||||||
|
}
|
||||||
|
|
||||||
// Unsubscribe from edge anchor events
|
// Unsubscribe from edge anchor events
|
||||||
if (edgeAnchor != null)
|
if (edgeAnchor != null)
|
||||||
|
|||||||
@@ -168,14 +168,10 @@ namespace Minigames.DivingForPictures
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnEnable()
|
private void Start()
|
||||||
{
|
{
|
||||||
// Register with the DivingGameManager for pause/resume events
|
// Register with the DivingGameManager for pause/resume events
|
||||||
DivingGameManager.Instance.RegisterPausableComponent(this);
|
DivingGameManager.Instance.RegisterPausableComponent(this);
|
||||||
}
|
|
||||||
|
|
||||||
private void Start()
|
|
||||||
{
|
|
||||||
DivingGameManager.Instance.OnGameInitialized += Initialize;
|
DivingGameManager.Instance.OnGameInitialized += Initialize;
|
||||||
|
|
||||||
// If game is already initialized, initialize immediately
|
// If game is already initialized, initialize immediately
|
||||||
@@ -189,7 +185,7 @@ namespace Minigames.DivingForPictures
|
|||||||
|
|
||||||
private void OnDestroy()
|
private void OnDestroy()
|
||||||
{
|
{
|
||||||
DivingGameManager.Instance.UnregisterPausableComponent(this);
|
DivingGameManager.Instance?.UnregisterPausableComponent(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ namespace Minigames.DivingForPictures.Utilities
|
|||||||
|
|
||||||
private bool isPaused = false;
|
private bool isPaused = false;
|
||||||
|
|
||||||
private void OnEnable()
|
private void Start()
|
||||||
{
|
{
|
||||||
DivingGameManager.Instance.RegisterPausableComponent(this);
|
DivingGameManager.Instance.RegisterPausableComponent(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ namespace Minigames.DivingForPictures.Utilities
|
|||||||
|
|
||||||
private bool isPaused = false;
|
private bool isPaused = false;
|
||||||
|
|
||||||
private void OnEnable()
|
private void Start()
|
||||||
{
|
{
|
||||||
DivingGameManager.Instance.RegisterPausableComponent(this);
|
DivingGameManager.Instance.RegisterPausableComponent(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,12 +9,6 @@ public class DivingGameOverScreen : MonoBehaviour
|
|||||||
[SerializeField]
|
[SerializeField]
|
||||||
private TextMeshProUGUI finalScoreText;
|
private TextMeshProUGUI finalScoreText;
|
||||||
|
|
||||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
|
||||||
void Start()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void OnEnable()
|
void OnEnable()
|
||||||
{
|
{
|
||||||
if (DivingGameManager.Instance != null)
|
if (DivingGameManager.Instance != null)
|
||||||
|
|||||||
@@ -26,9 +26,9 @@ MonoBehaviour:
|
|||||||
spawnCooldown: 5
|
spawnCooldown: 5
|
||||||
basePoints: 100
|
basePoints: 100
|
||||||
depthMultiplier: 10
|
depthMultiplier: 10
|
||||||
speedTransitionDuration: 2
|
speedTransitionDuration: 3
|
||||||
surfacingSpeedFactor: 6
|
surfacingSpeedFactor: 6
|
||||||
surfacingSpawnDelay: 5
|
surfacingSpawnDelay: 2
|
||||||
referenceScreenHeight: 1920
|
referenceScreenHeight: 1920
|
||||||
initialTileCount: 3
|
initialTileCount: 3
|
||||||
tileSpawnBuffer: 2
|
tileSpawnBuffer: 2
|
||||||
|
|||||||
Reference in New Issue
Block a user