Revive Stucking Bug Fixed

dev-ali
Ali Sharoz 6 days ago
parent 60b5c1d3e9
commit d35f90efaa

@ -142,6 +142,7 @@ namespace D2D.Gameplay
{ {
if (_isPlayer) if (_isPlayer)
{ {
Debug.Log("RewardType: " + rewardedTypes.ToString());
if (rewardedTypes != RewardedTypes.Revive) return; if (rewardedTypes != RewardedTypes.Revive) return;
StopCoroutine(deathCoroutine); StopCoroutine(deathCoroutine);
CurrentPoints = MaxPoints; CurrentPoints = MaxPoints;
@ -157,7 +158,7 @@ namespace D2D.Gameplay
IEnumerator DeathCoroutine() IEnumerator DeathCoroutine()
{ {
yield return new WaitForSeconds(6f); yield return new WaitForSeconds(6f);
GameManager.Instance.OnRevival(); //GameManager.Instance.OnRevival();
InitiateDeathSequence(); InitiateDeathSequence();
} }

@ -28,6 +28,7 @@ namespace D2D.UI
} }
private void ShowLoseWindowAfterDelay() private void ShowLoseWindowAfterDelay()
{ {
float delay = UISettings.Instance.loseWindowOpenDelay; float delay = UISettings.Instance.loseWindowOpenDelay;
_loseWindow.On(after: delay); _loseWindow.On(after: delay);
} }

@ -19,7 +19,7 @@ namespace D2D
protected override void OnGameFinish() => Show(_onGameFinish); protected override void OnGameFinish() => Show(_onGameFinish);
protected override void OnGameLose() => Show(_onLose); protected override void OnGameLose() => Show(_onLose,_onReviveOption);
protected override void OnGameWin() => Show(_onWin); protected override void OnGameWin() => Show(_onWin);
protected override void OnRevivalState() => Show(_onReviveOption); protected override void OnRevivalState() => Show(_onReviveOption);
@ -39,6 +39,34 @@ namespace D2D
var window = o.GetComponent<Window>(); var window = o.GetComponent<Window>();
if (window != null)
delay = window.OpenDelay;
if (_toggleToActive)
o.On(delay);
else
o.Off(delay);
}
}
private void Show(GameObject[] parent, GameObject[] disableParent)
{
if (parent.IsNullOrEmpty())
return;
foreach (GameObject o in disableParent)
{
o.gameObject.SetActive(false);
}
foreach (GameObject o in parent)
{
float delay = _delay;
if (o == null)
continue;
var window = o.GetComponent<Window>();
if (window != null) if (window != null)
delay = window.OpenDelay; delay = window.OpenDelay;

@ -9,12 +9,12 @@ public class GameManager : MonoBehaviour
private void Awake() private void Awake()
{ {
if (Instance is null) //if (Instance is null)
Instance = this; Instance = this;
else //else
{ //{
DestroyImmediate(this); // DestroyImmediate(this);
} //}
} }
@ -24,11 +24,19 @@ public class GameManager : MonoBehaviour
public void OnRevival() public void OnRevival()
{ {
Debug.Log("OnRevival");
if (ReviveCanvas != null) if (ReviveCanvas != null)
{ {
Debug.Log("OnRevival2");
ReviveCanvas.SetActive(false); ReviveCanvas.SetActive(false);
reviveOnClick.Was = false; reviveOnClick.Was = false;
} }
else
{
Debug.Log("Revival Canvas == null");
}
} }
} }

@ -140,7 +140,7 @@ PlayerSettings:
loadStoreDebugModeEnabled: 0 loadStoreDebugModeEnabled: 0
visionOSBundleVersion: 1.0 visionOSBundleVersion: 1.0
tvOSBundleVersion: 1.0 tvOSBundleVersion: 1.0
bundleVersion: 1.1 bundleVersion: 0.1
preloadedAssets: [] preloadedAssets: []
metroInputSource: 0 metroInputSource: 0
wsaTransparentSwapchain: 0 wsaTransparentSwapchain: 0
@ -171,7 +171,7 @@ PlayerSettings:
iPhone: 0 iPhone: 0
tvOS: 0 tvOS: 0
overrideDefaultApplicationIdentifier: 1 overrideDefaultApplicationIdentifier: 1
AndroidBundleVersionCode: 3 AndroidBundleVersionCode: 7
AndroidMinSdkVersion: 22 AndroidMinSdkVersion: 22
AndroidTargetSdkVersion: 35 AndroidTargetSdkVersion: 35
AndroidPreferredInstallLocation: 1 AndroidPreferredInstallLocation: 1
@ -290,7 +290,7 @@ PlayerSettings:
- m_BuildTarget: - m_BuildTarget:
m_Icons: m_Icons:
- serializedVersion: 2 - serializedVersion: 2
m_Icon: {fileID: 2800000, guid: ea801209ccd4d9149be6a72b38b50f52, type: 3} m_Icon: {fileID: 2800000, guid: 09b5cb90a026d2c49bd8a9699138f1e1, type: 3}
m_Width: 128 m_Width: 128
m_Height: 128 m_Height: 128
m_Kind: 0 m_Kind: 0
@ -936,7 +936,7 @@ PlayerSettings:
XboxOneOverrideIdentityPublisher: XboxOneOverrideIdentityPublisher:
vrEditorSettings: {} vrEditorSettings: {}
cloudServicesEnabled: cloudServicesEnabled:
Purchasing: 1 Purchasing: 0
UNet: 1 UNet: 1
luminIcon: luminIcon:
m_Name: m_Name:
@ -957,11 +957,11 @@ PlayerSettings:
apiCompatibilityLevel: 6 apiCompatibilityLevel: 6
activeInputHandler: 0 activeInputHandler: 0
windowsGamepadBackendHint: 0 windowsGamepadBackendHint: 0
cloudProjectId: f692c634-56c3-45e3-a92e-6c84712edd18 cloudProjectId:
framebufferDepthMemorylessMode: 0 framebufferDepthMemorylessMode: 0
qualitySettingsNames: [] qualitySettingsNames: []
projectName: Heroes Of Labyrinth projectName:
organizationId: rizzestudios organizationId:
cloudEnabled: 0 cloudEnabled: 0
legacyClampBlendShapeWeights: 0 legacyClampBlendShapeWeights: 0
hmiLoadingImage: {fileID: 0} hmiLoadingImage: {fileID: 0}

Loading…
Cancel
Save