예제 #1
0
        public void SetAction(ShopAction shopAction)
        {
            this.shopAction = shopAction;

            if (shopAction.ObjectToRender != null)
            {
                renderedMeshUI.scaleMultiplier = shopAction.scaleMultiplier;
                renderedMeshUI.eulOffset       = shopAction.eulOffset;
                renderedMeshUI.AssignObjectToRender(shopAction.ObjectToRender);

                ShopAction_UnlockDecoration shopAction_unlock = shopAction as ShopAction_UnlockDecoration;
                if (shopAction_unlock != null)
                {
                    shopAction_unlock.UnlockableDecorationObject.rawImage = renderedMeshUI.GetRawImage();
                }
                iconUI.enabled = false;
            }
            else
            {
                iconUI.sprite  = shopAction.iconSprite;
                iconUI.enabled = true;
            }

            amountUI.text = shopAction.bonesCost.ToString();
            UpdateAction();
        }
예제 #2
0
        public void SetAction(ShopAction shopAction)
        {
            this.shopAction = shopAction;

            if (shopAction.ObjectToRender != null)
            {
                renderedMeshUI.scaleMultiplier = shopAction.scaleMultiplier;
                renderedMeshUI.eulOffset       = shopAction.eulOffset;
                renderedMeshUI.AssignObjectToRender(shopAction.ObjectToRender);
                iconUI.enabled = false;
            }
            else
            {
                iconUI.sprite  = shopAction.iconSprite;
                iconUI.enabled = true;
            }

            amountUI.text = shopAction.bonesCost.ToString();
            UpdateAction();
        }