随笔分类 -  Unity3D引擎

实训2飞思
摘要:老窝的被攻击死亡——也就是被攻击的时候,老窝图片切换,使用到精灵渲染组件 1 public class Heart : MonoBehaviour { 2 private SpriteRenderer spriteRender; //持有精灵渲染器 3 public Sprite Borken; 4 阅读全文
posted @ 2020-07-03 11:44 瓜沙呱 阅读(95) 评论(0) 推荐(0)
摘要://不要拖成预制体! 不要拖成预制体! 不要拖成预制体! 预制体 = 复印件; object = 原件 1.定义一个bool 变量,是否为自己发射的子弹。 public bool isPlayerBullet = false; 2.在持续触发的标签内,(swich) case "Tank": if 阅读全文
posted @ 2020-07-03 10:47 瓜沙呱 阅读(193) 评论(0) 推荐(0)
摘要:用一个cure做成一个透明的障碍,添加碰撞 阅读全文
posted @ 2020-07-02 15:51 瓜沙呱 阅读(144) 评论(0) 推荐(0)
摘要:1 using System.Collections; 2 using System.Collections.Generic; 3 using UnityEngine; 4 5 public class Bullet : MonoBehaviour { 6 public float moveSpee 阅读全文
posted @ 2020-07-02 11:39 瓜沙呱 阅读(270) 评论(0) 推荐(0)
摘要:1 using System.Collections; 2 using System.Collections.Generic; 3 using UnityEngine; 4 5 public class player : MonoBehaviour 6 { 7 8 private SpriteRen 阅读全文
posted @ 2020-07-02 10:40 瓜沙呱 阅读(704) 评论(0) 推荐(0)