角色预制体创建
This commit is contained in:
26
Assets/Scripts/Global.cs
Normal file
26
Assets/Scripts/Global.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public class Global : MonoBehaviour
|
||||
{
|
||||
public static Global Instance { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// 主摄像机
|
||||
/// </summary>
|
||||
public Camera MainCamera { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// 摄像机配置
|
||||
/// </summary>
|
||||
public CameraScriptObject CameraConfig { get; private set; }
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
Instance = this;
|
||||
CameraConfig = Resources.Load<CameraScriptObject>(nameof(CameraConfig));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user