上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 18 下一页
摘要: public class L9 : MonoBehaviour { public AudioSource audioS; private Texture tex; // Start is called before the first frame update void Start() { //Re 阅读全文
posted @ 2025-03-21 20:54 cannedmint 阅读(116) 评论(0) 推荐(0)
摘要: public class L8 : MonoBehaviour { // Start is called before the first frame update void Start() { //工程路径的获取 //该方式获取到的路径一般只在编辑模式下使用 //游戏发布过后该路径就不存在了 pr 阅读全文
posted @ 2025-03-21 19:53 cannedmint 阅读(24) 评论(0) 推荐(0)
摘要: public class L7 : MonoBehaviour { Thread t; //申明一个变量作为一个公共内存 Queue <Vector3> queue = new Queue <Vector3> (); // Start is called before the first frame 阅读全文
posted @ 2025-03-21 17:39 cannedmint 阅读(14) 评论(0) 推荐(0)
摘要: public class L6 : MonoBehaviour { // Start is called before the first frame update void Start() { //延迟函数就是会延迟执行的函数,可以自己设定延迟的时间和要执行的函数 //延迟函数是Mono基类中实现 阅读全文
posted @ 2025-03-21 16:41 cannedmint 阅读(20) 评论(0) 推荐(0)
摘要: 万向节死锁 当某个特定轴达到某个特殊值时,绕一个旋转轴可能会覆盖住另一个轴的旋转,从而失去一维自由度 Unity中x轴达到90度时会产生万向节死锁 对于给定旋转,假设绕着n轴旋转β度,n轴为(x,y,z) 则可以构成四元数 四元数Q=[cos(β/2),sin(β/2)n] =[cos(β/2),s 阅读全文
posted @ 2025-03-21 10:41 cannedmint 阅读(27) 评论(0) 推荐(0)
摘要: public class L4 : MonoBehaviour { public Transform target; private Vector3 startPos; private float time; private Vector3 nowTarget; // Start is called 阅读全文
posted @ 2025-03-21 09:08 cannedmint 阅读(18) 评论(0) 推荐(0)
摘要: public class L1 : MonoBehaviour { // Start is called before the first frame update void Start() { //Mathf和Math //Math是C#中封装好的用于数学计算的工具类,在System命名空间中 / 阅读全文
posted @ 2025-03-19 19:52 cannedmint 阅读(34) 评论(0) 推荐(0)
摘要: public class L1 : MonoBehaviour { void Start() { //PlayerPrefs是unity提供的可以用于存储读取玩家数据的公共类 //PlayerPrefs的数据存储类似于键值对存储 //提供了3种数据存储方法 int float string //键: 阅读全文
posted @ 2025-03-19 19:05 cannedmint 阅读(39) 评论(0) 推荐(0)
摘要: public enum E_Style_Switch { On, Off, } public class baseControl : MonoBehaviour { //位置信息 public basePos pos; //内容信息 public GUIContent content; //自定义样 阅读全文
posted @ 2025-03-18 15:28 cannedmint 阅读(4) 评论(0) 推荐(0)
摘要: //对齐方式 public enum E_Aligment_Type { Up, Down, Left, Right, Center, Left_Up, Right_Up, Left_Down, Right_Down, } //存储计算数据,不需要继承Mono public class basePo 阅读全文
posted @ 2025-03-18 11:55 cannedmint 阅读(34) 评论(0) 推荐(0)
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 18 下一页