Minor - V0.1.0 - Add assets and setup the env for android handheld
This commit is contained in:
42
Assets/script/GameManager.cs
Normal file
42
Assets/script/GameManager.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace script
|
||||
{
|
||||
public class GameManager : MonoBehaviour
|
||||
{
|
||||
private static GameManager _instance;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
if (_instance != null && _instance != this)
|
||||
{
|
||||
Destroy(this.gameObject);
|
||||
}
|
||||
else
|
||||
{
|
||||
_instance = this;
|
||||
DontDestroyOnLoad(this.gameObject);
|
||||
}
|
||||
|
||||
#if UNITY_ANDROID
|
||||
{
|
||||
Screen.orientation = ScreenOrientation.LandscapeLeft;
|
||||
var refreshRate = Screen.currentResolution.refreshRateRatio.numerator;
|
||||
Application.targetFrameRate = 10000; //(int)refreshRate;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/script/GameManager.cs.meta
Normal file
2
Assets/script/GameManager.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 05db99b32de928246a0a6fac6552f575
|
||||
Reference in New Issue
Block a user