public HpBar AddHpBar(Transform owner, float offset) { Transform h = Instantiate(hpBarPrefab, this.transform) as Transform; HpBar b = h.GetComponent <HpBar>(); b.SetOwner(owner, offset); return(b); }