/// <summary> /// Check if spawning the game ui is fine. If already exists /// then is not fine. /// </summary> /// <param name="type"></param> /// <returns></returns> private static bool CheckIfOkayToSpawnGameUI(JCS_DialogueType type) { if (JCS_UIManager.instance.GetJCSDialogue(type) != null) { JCS_Debug.LogError("(" + type.ToString() + ")No able to spawn Game UI cuz there are multiple GameUI in the scene..."); return(false); } return(true); }
/// <summary> /// Check to see if enable to spawn the dialogue or not /// </summary> /// <returns></returns> private static bool CheckIfOkayToSpawnDialogue(JCS_DialogueType type) { // Force Diaglogue have higher priority, // so it will block the lower priority dialogue type if (JCS_UIManager.instance.GetJCSDialogue(type) != null) { JCS_Debug.LogError("(" + type.ToString() + ")No able to spawn Dialogue cuz there are multiple dialogue in the scene..."); return(false); } if (JCS_Canvas.GuessCanvas() == null) { JCS_Debug.LogError("No able to spawn Dialogue cuz Canvas are null..."); return(false); } return(true); }