public GameUnit(GameObject go) { this.unit = go.GetComponent <Unit>(); this.healthBar = Instantiate <GameObject>(healthbarPrefab).GetComponent <HealthBar3D>(); this.healthBar.unit = this.unit; this.controller = null; }
public GameUnit(Unit u, HealthBar3D h, IUnitController c) { this.unit = u; this.healthBar = h; this.controller = c; }