// 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>(); }
public void SetHpConfig(HpConfig hpConfig) { _liveble.HpConfig = hpConfig; _liveble.InitHp(); }