public static void Create(PowerPotController owner, Action <ChargeBar> callback) { var prefab = Resources.Load(ChargeBar.PrefabPath) as GameObject; var go = Instantiate(prefab, UIManager.I.ChargeBarParent); var res = go.GetComponent <ChargeBar>(); res.Setup(owner); callback(res); }
public void Setup(PowerPotController owner) { Owner = owner; Reset(); }