| 1234567891011121314151617181920212223242526272829 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class HRB_Mgr : MonoBehaviour
- {
- void Start()
- {
- Screen.orientation = ScreenOrientation.AutoRotation;//设置方向为自动(根据需要自动旋转屏幕朝向任何启用的方向。)
- Screen.autorotateToLandscapeRight = true; //允许自动旋转到右横屏
- Screen.autorotateToLandscapeLeft = true; //允许自动旋转到左横屏
- Screen.autorotateToPortrait = false; //不允许自动旋转到纵向
- Screen.autorotateToPortraitUpsideDown = false; //不允许自动旋转到纵向上下
- if (LoginMgr.HasToken()) HRB_ViewMgr.Instance.ShowView<HRB_HomeView>();
- else HRB_ViewMgr.Instance.ShowView<HRB_LoginView>();
- }
- void Update()
- {
- #if UNITY_EDITOR
- if (Input.GetKeyDown(KeyCode.F3))
- {
- PlayerPrefs.DeleteAll();
- Debug.Log("清除所有本地记录");
- }
- #endif
- }
- }
|