摘要:
public class Lesson7 : MonoBehaviour { // Start is called before the first frame update void Start() { #region 角度 //相对世界坐标角度 print(transform.eulerAngl 阅读全文
posted @ 2025-03-15 20:55
cannedmint
阅读(10)
评论(0)
推荐(0)
摘要:
public class Lesson6 : MonoBehaviour { // Start is called before the first frame update void Start() { #region Vector3 //Vector3主要是用来表示三维坐标系中的一个点或一个向量 阅读全文
posted @ 2025-03-15 19:51
cannedmint
阅读(30)
评论(0)
推荐(0)
摘要:
public class Lesson5 : MonoBehaviour { // Start is called before the first frame update void Start() { //时间相关内容主要用于游戏中参与位移,计时,时间暂停等 #region 时间缩放比例 //时 阅读全文
posted @ 2025-03-15 17:34
cannedmint
阅读(23)
评论(0)
推荐(0)
摘要:
public class GameObj : MonoBehaviour { //准备用来克隆的对象 //可以是场景上的对象,也可以是预设体对象 public GameObject obj4; // Start is called before the first frame update void 阅读全文
posted @ 2025-03-15 16:51
cannedmint
阅读(9)
评论(0)
推荐(0)
摘要:
public class MonoIm : MonoBehaviour { public MonoIm otherMono; // Start is called before the first frame update void Start() { #region 重要成员 //获取依附的Gam 阅读全文
posted @ 2025-03-15 13:48
cannedmint
阅读(15)
评论(0)
推荐(0)
摘要:
[System.Serializable] public class MyClass { public int id; public string name; } public class Inspector : MonoBehaviour { //Inspector窗口中可编辑的就是脚本的成员变量 阅读全文
posted @ 2025-03-15 12:13
cannedmint
阅读(9)
评论(0)
推荐(0)
摘要:
生命周期函数 生命周期函数就是该脚本对象依附的GameObject对象从出生到消亡整个生命周期中会通过反射自动调用的一些特殊函数 生命周期函数的访问修饰符一般为private和protected public class LifePeriod : MonoBehaviour { //当对象(自己这个 阅读全文
posted @ 2025-03-15 11:02
cannedmint
阅读(35)
评论(0)
推荐(0)

浙公网安备 33010602011771号