12 2017 档案
摘要:一、添加单例模板类 1 using UnityEngine; 2 3 public class Singleton<T> : MonoBehaviour where T : MonoBehaviour 4 { 5 private static T _instance; 6 7 private sta
阅读全文
摘要:1 using UnityEngine; 2 using System.Collections; 3 using System.Collections.Generic; 4 [ExecuteInEditMode] 5 public class Parabola : MonoBehaviour { 6
阅读全文
摘要:代码源自游戏《A Place for the Unwilling》 开发《A Place for the Unwilling》游戏第一部要解决的问题就是让精灵可以围绕其它精灵前后移动,呈现出真实的深度感觉。SpriteRenderer组件有两个属性,可以改变场景中Sprite的渲染顺序。 Sorti
阅读全文