标签:void upd tco led Once mon star frame span
老窝的被攻击死亡——也就是被攻击的时候,老窝图片切换,使用到精灵渲染组件
1 public class Heart : MonoBehaviour { 2 private SpriteRenderer spriteRender; //持有精灵渲染器 3 public Sprite Borken; 4 // Use this for initialization 5 void Start () { 6 spriteRender = this.GetComponent<SpriteRenderer>(); 7 } 8 9 // Update is called once per frame 10 void Update () { 11 12 } 13 14 //老家死亡 15 public void Die() 16 { 17 spriteRender.sprite = Borken; 18 } 19 }
标签:void upd tco led Once mon star frame span
原文地址:https://www.cnblogs.com/yangguolin/p/13229490.html