2018年10月29日
摘要:
1 public GameObject[] characterPrefabs;//在外部赋值的角色 2 private GameObject[] characterGameObjects;//在代码中赋值的角色 3 private int selectIndex = 0; //当前选择的角色 4 private int length; //所有可供选择的角色...
阅读全文
posted @ 2018-10-29 10:28
追求LPY
阅读(554)
推荐(0)
2018年10月9日
posted @ 2018-10-09 16:58
追求LPY
阅读(591)
推荐(0)
2018年9月28日
摘要:
1 public float moveSpeed = 1;//物体旋转速度 2 public GameObject target; 3 4 private Vector2 oldPosition; 5 private Vector2 oldPosition1; 6 private Vector2 oldPosition2; ...
阅读全文
posted @ 2018-09-28 11:06
追求LPY
阅读(580)
推荐(0)
2018年9月26日
摘要:
//上下 x(-45,15) //左右 y(-60,60) private float maxYRotation = 120; private float minYRotation = 0; private float maxXRotation = 60; private float minXRotation = 0; void Update() ...
阅读全文
posted @ 2018-09-26 18:06
追求LPY
阅读(447)
推荐(0)
摘要:
理解 mousePos - transform.position 鼠标的位置减去挂在此脚本上物体的位置
阅读全文
posted @ 2018-09-26 18:04
追求LPY
阅读(301)
推荐(0)
2018年9月25日
摘要:
1 [Serializable]//序列化 2 public class Person 3 { 4 public string name; 5 public int age; 6 } 7 8 [Serializable]//序列化 9 public class Persons 10 { 11 public Person[] persons; 12 } ...
阅读全文
posted @ 2018-09-25 14:29
追求LPY
阅读(7566)
推荐(0)
摘要:
void Start () { Fun2(); // Fun3(); } //第二种方案 用Json自带的JsonData类库 private void Fun2() { //{ 'Heros':[{'name':'超人','power':95},{'name':'蝙蝠侠','age...
阅读全文
posted @ 2018-09-25 14:27
追求LPY
阅读(6571)
推荐(0)
摘要:
1 public class Hero 2 { 3 public string name; 4 public int power; 5 6 } 7 public class Heros 8 { 9 public Hero[] heros; 10 11 } 12 13 public class ListJsonDemo : MonoBehaviour...
阅读全文
posted @ 2018-09-25 14:25
追求LPY
阅读(290)
推荐(0)
2018年9月19日
posted @ 2018-09-19 14:42
追求LPY
阅读(2928)
推荐(0)
摘要:
//打开网页 ID只有一个数字不同 传参 public void URLVideo(int ID) { string tempUrl = string.Format("https://www.bilibili.com/video/av1124944/?p={0}", ID); Application.OpenURL(tempUrl); ...
阅读全文
posted @ 2018-09-19 11:14
追求LPY
阅读(4725)
推荐(0)