diff --git a/Assets/Prefabs/HUD.prefab b/Assets/Prefabs/HUD.prefab index fe8b132..a244546 100644 --- a/Assets/Prefabs/HUD.prefab +++ b/Assets/Prefabs/HUD.prefab @@ -220,9 +220,9 @@ RectTransform: m_Father: {fileID: 7485172030629334178} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 1, y: 1} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: -88.6, y: -24.2} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 748.4, y: -24.2} m_SizeDelta: {x: 160, y: 30} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &1962875550112426600 @@ -506,10 +506,10 @@ RectTransform: m_Father: {fileID: 7485172030629334178} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 1, y: 1} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: -746.6, y: -24.2} - m_SizeDelta: {x: 160, y: 30} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 120, y: -24} + m_SizeDelta: {x: 200, y: 30} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &5773967910327396056 CanvasRenderer: @@ -585,10 +585,10 @@ RectTransform: m_Father: {fileID: 3965881083143910201} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 1, y: 1} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: -746.6, y: -24.200012} - m_SizeDelta: {x: 160, y: 30} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 120, y: -24} + m_SizeDelta: {x: 200, y: 30} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &21748230045983853 CanvasRenderer: diff --git a/Assets/Scripts/PlayerFun.cs b/Assets/Scripts/PlayerFun.cs index 608e5cd..268edb4 100644 --- a/Assets/Scripts/PlayerFun.cs +++ b/Assets/Scripts/PlayerFun.cs @@ -1,6 +1,7 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; +using UnityEngine.SceneManagement; namespace Saltosion.OneWeapon { public class PlayerFun : MonoBehaviour { @@ -41,6 +42,10 @@ namespace Saltosion.OneWeapon { CurrentFun = Mathf.Clamp(NewFun, 0, MaxFun); CurrentDamageBoost = Mathf.Floor((CurrentFun / 100) * 12) / 12; + + if (CurrentFun <= 0) { + SceneManager.LoadScene(2); + } } private void AddFun(float fun) {