
1.搭建完了场景3,等待补充动画和相关演出CG
建议:
(1.场景3的前排树的动画很怪,美术看看要不要调整
(2.多张合一张的逐帧动画注意分割像素割齐,不要一个宽100一个宽110这样,保证每一个单元的分辨率一样
可以摸鱼吗😿
41 lines
846 B
C#
41 lines
846 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
/// <summary>
|
|
/// 单例模式类模板
|
|
/// </summary>
|
|
public class UnitySingleton<T> : MonoBehaviour
|
|
where T : Component
|
|
{
|
|
private static T m_instance;
|
|
|
|
public static T Instance
|
|
{
|
|
get
|
|
{
|
|
if (m_instance == null)
|
|
{
|
|
m_instance = FindObjectOfType<T>();
|
|
if (m_instance == null)
|
|
{
|
|
Debug.LogError("缺少 " + typeof(T) + " 这个单例,没法在场景中找到");
|
|
}
|
|
}
|
|
return m_instance;
|
|
}
|
|
}
|
|
|
|
protected virtual void Awake()
|
|
{
|
|
if (m_instance == null)
|
|
{
|
|
m_instance = this as T;
|
|
}
|
|
else
|
|
{
|
|
Destroy(gameObject);
|
|
}
|
|
}
|
|
}
|