// ------------------------------------------------------------------------------- public void Show(Plant plant, PlantGrowthRequirement growthRequirement) { mPlant = plant; mGrowthRequirement = growthRequirement; BackgroundImage.sprite = mGrowthRequirement.UISprite; ForegroundImage.sprite = mGrowthRequirement.UISprite; Show(false); }
// ------------------------------------------------------------------------------- protected override void OnHide(bool instant = false) { if (IsVisible) { if (instant) { SetScale(Vector3.zero); } else { TweenScale(1.0f, 0.0f); } IsVisible = false; mPlant = null; mGrowthRequirement = null; } }