随笔分类 - Unity3D引擎
实训2飞思
摘要:老窝的被攻击死亡——也就是被攻击的时候,老窝图片切换,使用到精灵渲染组件 1 public class Heart : MonoBehaviour { 2 private SpriteRenderer spriteRender; //持有精灵渲染器 3 public Sprite Borken; 4
阅读全文
摘要://不要拖成预制体! 不要拖成预制体! 不要拖成预制体! 预制体 = 复印件; object = 原件 1.定义一个bool 变量,是否为自己发射的子弹。 public bool isPlayerBullet = false; 2.在持续触发的标签内,(swich) case "Tank": if
阅读全文
摘要:1 using System.Collections; 2 using System.Collections.Generic; 3 using UnityEngine; 4 5 public class Bullet : MonoBehaviour { 6 public float moveSpee
阅读全文
摘要:1 using System.Collections; 2 using System.Collections.Generic; 3 using UnityEngine; 4 5 public class player : MonoBehaviour 6 { 7 8 private SpriteRen
阅读全文

浙公网安备 33010602011771号