- 博客(3)
- 收藏
- 关注
原创 灭火,粒子碰撞,水
1.创建粒子系统,水 2.脚本 利用粒子系统的显示、隐藏,来实现水的开关 ///水粒子 public GameObject water;//水 //水粒子灭火 if (Input.GetMouseButton(1))//鼠标右键被持续按下,开水粒子系统 { water.SetActive(true); }else if (Input.GetMouseButtonUp(1))//右键抬起,水粒子系统关闭 { water.SetActive(false); } ...
2020-10-07 08:55:42
358
1
原创 灭火,粒子碰撞
1.创建粒子系统:火 2.创建脚本 /// /// 灭火 /// public ParticleSystem pa;//粒子系统 public Text text;//粒子系统的提示 // Use this for initialization void Start () { pa.startSize = 2;//设置初始粒子大小为2 } // Update is called once per frame void Update () { } //火焰被碰撞时 void OnPartic
2020-10-07 08:49:57
296
原创 灭火器移动
1.创建一个灭火器 2.创建脚本 /// /// 移动灭火器 /// private Vector3 targetScreenpos;//拖拽物体的屏幕坐标 private Vector3 targetWorldpos;//拖拽物体的世界坐标 private Transform target;//拖拽物体 private Vector3 mouseScreenpos;//鼠标的屏幕坐标 private Vector3 offset;//偏移量 void Start() { target =
2020-10-07 08:43:21
292
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人