コード例 #1
0
    // -------------------------------------------------------------------------------

    public void Show(Plant plant, PlantGrowthRequirement growthRequirement)
    {
        mPlant             = plant;
        mGrowthRequirement = growthRequirement;

        BackgroundImage.sprite = mGrowthRequirement.UISprite;
        ForegroundImage.sprite = mGrowthRequirement.UISprite;

        Show(false);
    }
コード例 #2
0
    // -------------------------------------------------------------------------------

    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;
        }
    }