public OneUnitHealthController(IUnitSettings unitSettings, Camera camera) { _unit = unitSettings.GraphicObject; _lookAtCameraController = _unit.GetComponentInChildren(typeof(LookAtCameraController)) as LookAtCameraController; _lookAtCameraController.main_camera = camera; _healthBarController = _unit.GetComponentInChildren(typeof(HealthBarController)) as HealthBarController; _healthBarController.Set(1.0f); _healthBarGameObject = _unit.transform.Find("healthbar").gameObject; }
protected override void DisposeInternal() { _lookAtCameraController = null; _healthBarGameObject = null; base.DisposeInternal(); }