示例#1
0
 // Use this for initialization
 void Start()
 {
     rb           = GetComponent <Rigidbody2D>();
     enemy        = GameObject.FindGameObjectWithTag("Enemy");
     hp           = transform.GetChild(0).gameObject.GetComponent <HpConfig>();
     target       = GameObject.FindGameObjectWithTag("Player").transform;
     sortingGroup = GetComponent <SortingGroup>();
 }
示例#2
0
 public void SetHpConfig(HpConfig hpConfig)
 {
     _liveble.HpConfig = hpConfig;
     _liveble.InitHp();
 }