public void UpdateGage(Gages kind, float percent) { if (IsIncreasingPurify && kind == Gages.PURIFY && percent <= 0) { percent = 0; } if (Popin.Instance.PotionGreen && kind == Gages.PURIFY && percent <= 0) { percent = 0; } if (IsNotReducingOxygen && kind == Gages.OXYGEN) { percent = 0; } gageValues[kind] = Mathf.Clamp(gageValues[kind] + percent, 0, 100); if (gageValues[Gages.OXYGEN] == 0) { UIManager.Instance.OpenMenu <EndUI>(); if (StoryLobbyScene.StoryManager.Instance != null) { SceneManager.sceneLoaded -= StoryLobbyScene.StoryManager.Instance.OnSceneLoaded; Destroy(StoryLobbyScene.StoryManager.Instance.gameObject); } } }
public Image GetMask(Gages kind) { Image mask = null; switch (kind) { case Gages.PURIFY: mask = PurifyGageMask; break; } return(mask); }
public float GetGage(Gages kind) { return(gageValues[kind]); }