Beispiel #1
0
        public void Initialize(FurnitureModel furnitureModel, bool isValidBuy)
        {
            this.mFurnitureModel      = furnitureModel;
            this.mLabel_Category.text = string.Format("購入 - {0} - ", UserInterfaceInteriorManager.FurnitureKindToString(furnitureModel.Type));
            List <UIButton> list = new List <UIButton>();

            list.Add(this.mButton_Negative);
            if (isValidBuy)
            {
                list.Add(this.mButton_Positive);
            }
            list.Add(this.mButton_Preview);
            this.mFocasableButtons = list.ToArray();
            this.mButtonManager.UpdateButtons(this.mFocasableButtons);
            this.ChangeFocus(this.mFocasableButtons[0], false);
            if (isValidBuy)
            {
                this.mButton_Positive.set_enabled(true);
                this.mButton_Positive.isEnabled = true;
                this.mButton_Positive.SetState(UIButtonColor.State.Normal, true);
            }
            else
            {
                this.mButton_Positive.set_enabled(false);
                this.mButton_Positive.SetState(UIButtonColor.State.Disabled, true);
            }
            this.mTexture_Thumbnail.mainTexture = SingletonMonoBehaviour <ResourceManager> .Instance.Furniture.LoadInteriorStoreFurniture(this.mFurnitureModel.Type, this.mFurnitureModel.MstId);

            this.mLabel_WorkerCount.text = ((!this.mFurnitureModel.IsNeedWorker()) ? "不要" : "必要");
            this.mLabel_Price.text       = this.mFurnitureModel.Price.ToString();
            this.mLabel_Name.text        = this.mFurnitureModel.Name;
            for (int i = 0; i < this.mTransforms_Rate.Length; i++)
            {
                if (i < this.mFurnitureModel.Rarity)
                {
                    this.mTransforms_Rate[i].SetActive(true);
                }
                else
                {
                    this.mTransforms_Rate[i].SetActive(false);
                }
            }
        }
Beispiel #2
0
        public void Initialize(FurnitureModel furnitureModel, bool isValidBuy)
        {
            mFurnitureModel      = furnitureModel;
            mLabel_Category.text = $"購入 - {UserInterfaceInteriorManager.FurnitureKindToString(furnitureModel.Type)} - ";
            List <UIButton> list = new List <UIButton>();

            list.Add(mButton_Negative);
            if (isValidBuy)
            {
                list.Add(mButton_Positive);
            }
            list.Add(mButton_Preview);
            mFocasableButtons = list.ToArray();
            mButtonManager.UpdateButtons(mFocasableButtons);
            ChangeFocus(mFocasableButtons[0], needSe: false);
            if (isValidBuy)
            {
                mButton_Positive.enabled   = true;
                mButton_Positive.isEnabled = true;
                mButton_Positive.SetState(UIButtonColor.State.Normal, immediate: true);
            }
            else
            {
                mButton_Positive.enabled = false;
                mButton_Positive.SetState(UIButtonColor.State.Disabled, immediate: true);
            }
            mTexture_Thumbnail.mainTexture = SingletonMonoBehaviour <ResourceManager> .Instance.Furniture.LoadInteriorStoreFurniture(mFurnitureModel.Type, mFurnitureModel.MstId);

            mLabel_WorkerCount.text = ((!mFurnitureModel.IsNeedWorker()) ? "不要" : "必要");
            mLabel_Price.text       = mFurnitureModel.Price.ToString();
            mLabel_Name.text        = mFurnitureModel.Name;
            for (int i = 0; i < mTransforms_Rate.Length; i++)
            {
                if (i < mFurnitureModel.Rarity)
                {
                    mTransforms_Rate[i].SetActive(isActive: true);
                }
                else
                {
                    mTransforms_Rate[i].SetActive(isActive: false);
                }
            }
        }