Actually fix revive
This commit is contained in:
parent
eb6f1dd61f
commit
98421cb784
|
@ -811,10 +811,6 @@ PrefabInstance:
|
||||||
propertyPath: m_IncludeLayers.m_Bits
|
propertyPath: m_IncludeLayers.m_Bits
|
||||||
value: 4294967295
|
value: 4294967295
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 3086165646112058191, guid: 30e0cc55a67f02d4f92b2677ec4b1511, type: 3}
|
|
||||||
propertyPath: onlyCallZeroHealthOnce
|
|
||||||
value: 1
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 3086165646112058191, guid: 30e0cc55a67f02d4f92b2677ec4b1511, type: 3}
|
- target: {fileID: 3086165646112058191, guid: 30e0cc55a67f02d4f92b2677ec4b1511, type: 3}
|
||||||
propertyPath: OnHealthZero.m_PersistentCalls.m_Calls.Array.size
|
propertyPath: OnHealthZero.m_PersistentCalls.m_Calls.Array.size
|
||||||
value: 1
|
value: 1
|
||||||
|
@ -1451,10 +1447,6 @@ PrefabInstance:
|
||||||
propertyPath: m_Parameters.widthCurve.m_Curve.Array.data[1].outWeight
|
propertyPath: m_Parameters.widthCurve.m_Curve.Array.data[1].outWeight
|
||||||
value: 0.33333334
|
value: 0.33333334
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 3086165646112058191, guid: 99a6ff8b9591949439b620b13bd249a4, type: 3}
|
|
||||||
propertyPath: onlyCallZeroHealthOnce
|
|
||||||
value: 1
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 3086165646112058191, guid: 99a6ff8b9591949439b620b13bd249a4, type: 3}
|
- target: {fileID: 3086165646112058191, guid: 99a6ff8b9591949439b620b13bd249a4, type: 3}
|
||||||
propertyPath: OnHealthZero.m_PersistentCalls.m_Calls.Array.size
|
propertyPath: OnHealthZero.m_PersistentCalls.m_Calls.Array.size
|
||||||
value: 1
|
value: 1
|
||||||
|
@ -4260,6 +4252,10 @@ PrefabInstance:
|
||||||
propertyPath: m_Name
|
propertyPath: m_Name
|
||||||
value: UI
|
value: UI
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 9075173710402410956, guid: 48e0e53445d42474895d37a321c39d1c, type: 3}
|
||||||
|
propertyPath: m_AnchoredPosition.x
|
||||||
|
value: -9.998047
|
||||||
|
objectReference: {fileID: 0}
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_RemovedGameObjects: []
|
m_RemovedGameObjects: []
|
||||||
m_AddedGameObjects: []
|
m_AddedGameObjects: []
|
||||||
|
|
|
@ -21,17 +21,14 @@ public class GameManager : MonoBehaviour
|
||||||
|
|
||||||
void Awake()
|
void Awake()
|
||||||
{
|
{
|
||||||
if (Instance == null)
|
if (Instance != null)
|
||||||
{
|
{
|
||||||
Instance = this;
|
Destroy(Instance);
|
||||||
DontDestroyOnLoad(gameObject);
|
|
||||||
Revives = 1;
|
|
||||||
ReviveText.text = Revives + "x";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Destroy(gameObject);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Instance = this;
|
||||||
|
Revives = 1;
|
||||||
|
ReviveText.text = Revives + "x";
|
||||||
}
|
}
|
||||||
|
|
||||||
void Start()
|
void Start()
|
||||||
|
@ -40,6 +37,7 @@ public class GameManager : MonoBehaviour
|
||||||
|
|
||||||
public void playerDied(GameObject who)
|
public void playerDied(GameObject who)
|
||||||
{
|
{
|
||||||
|
Debug.Log($"{who.name} died");
|
||||||
if (Revives == 0)
|
if (Revives == 0)
|
||||||
{
|
{
|
||||||
AudioManager.Instance.StopAllAudio();
|
AudioManager.Instance.StopAllAudio();
|
||||||
|
|
|
@ -109,7 +109,10 @@ public class HealthComponent : MonoBehaviour, ISquezeDamageReceiver
|
||||||
maxHealth = amount;
|
maxHealth = amount;
|
||||||
|
|
||||||
if (heal)
|
if (heal)
|
||||||
|
{
|
||||||
currentHealth = amount;
|
currentHealth = amount;
|
||||||
|
alreadyReachedZero = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void TakeDamage(float damage)
|
public void TakeDamage(float damage)
|
||||||
|
|
|
@ -139,7 +139,8 @@ PlayerSettings:
|
||||||
vulkanEnableCommandBufferRecycling: 1
|
vulkanEnableCommandBufferRecycling: 1
|
||||||
loadStoreDebugModeEnabled: 0
|
loadStoreDebugModeEnabled: 0
|
||||||
bundleVersion: 1.0
|
bundleVersion: 1.0
|
||||||
preloadedAssets: []
|
preloadedAssets:
|
||||||
|
- {fileID: 11400000, guid: de04e34f85a966e4da851d9b3d804fa1, type: 2}
|
||||||
metroInputSource: 0
|
metroInputSource: 0
|
||||||
wsaTransparentSwapchain: 0
|
wsaTransparentSwapchain: 0
|
||||||
m_HolographicPauseOnTrackingLoss: 1
|
m_HolographicPauseOnTrackingLoss: 1
|
||||||
|
|
Loading…
Reference in New Issue