Revive Stucking Bug Fixed

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

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

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

@ -19,7 +19,7 @@ namespace D2D
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 OnRevivalState() => Show(_onReviveOption);
@ -48,5 +48,33 @@ namespace D2D
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)
delay = window.OpenDelay;
if (_toggleToActive)
o.On(delay);
else
o.Off(delay);
}
}
}
}

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

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

Loading…
Cancel
Save