选章节
This commit is contained in:
29
Assets/Scripts/UI/UIManager.cs
Normal file
29
Assets/Scripts/UI/UIManager.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.UI
|
||||
{
|
||||
public class UIManager : MonoBehaviour
|
||||
{
|
||||
public static UIManager instance;
|
||||
|
||||
private static readonly Vector2 standardResolution = new Vector2(1920, 1080);
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
instance = this;
|
||||
}
|
||||
|
||||
public float GetScreenRatio()
|
||||
{
|
||||
return (float)Screen.width / Screen.height;
|
||||
}
|
||||
|
||||
public bool IsWideScreen()
|
||||
{
|
||||
return GetScreenRatio() < 1.34f;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user