コード例 #1
0
        private void Start()
        {
            if (Object.op_Inequality((Object)this.BtnPlus, (Object)null))
            {
                // ISSUE: method pointer
                ((UnityEvent)this.BtnPlus.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(OnAddNum)));
            }
            if (Object.op_Inequality((Object)this.BtnMinus, (Object)null))
            {
                // ISSUE: method pointer
                ((UnityEvent)this.BtnMinus.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(OnRemoveNum)));
            }
            if (Object.op_Inequality((Object)this.BtnMax, (Object)null))
            {
                // ISSUE: method pointer
                ((UnityEvent)this.BtnMax.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(OnMaxNum)));
            }
            string iname = FlowNode_Variable.Get("USE_TICKET_INAME");

            FlowNode_Variable.Set("USE_TICKET_INAME", string.Empty);
            if (string.IsNullOrEmpty(iname))
            {
                DebugUtility.LogError("不正なアイテムが指定されました");
                FlowNode_GameObject.ActivateOutputLinks((Component)this, 103);
            }
            else
            {
                ItemData itemDataByItemId = MonoSingleton <GameManager> .Instance.Player.FindItemDataByItemID(iname);

                if (itemDataByItemId == null || itemDataByItemId.Num < 0)
                {
                    DebugUtility.LogError("所持していないアイテムが指定されました");
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 104);
                }
                else
                {
                    if (Object.op_Equality((Object)this.gacham, (Object)null))
                    {
                        this.gacham = MonoSingleton <GachaManager> .Instance;
                    }
                    this.Refresh(itemDataByItemId);
                }
            }
        }
コード例 #2
0
        private void Start()
        {
            string iname = FlowNode_Variable.Get("USE_TICKET_INAME");

            FlowNode_Variable.Set("USE_TICKET_INAME", string.Empty);
            if (string.IsNullOrEmpty(iname))
            {
                FlowNode_GameObject.ActivateOutputLinks((Component)this, 103);
            }
            else
            {
                GameManager instance = MonoSingleton <GameManager> .Instance;
                if (instance.Player.GetItemAmount(iname) <= 0)
                {
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 104);
                }
                else
                {
                    this.mCurrentItemData = instance.Player.FindItemDataByItemID(iname);
                    if (Object.op_Inequality((Object)this.BtnPlus, (Object)null))
                    {
                        // ISSUE: method pointer
                        ((UnityEvent)this.BtnPlus.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(OnAddNum)));
                    }
                    if (Object.op_Inequality((Object)this.BtnMinus, (Object)null))
                    {
                        // ISSUE: method pointer
                        ((UnityEvent)this.BtnMinus.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(OnRemoveNum)));
                    }
                    if (Object.op_Equality((Object)this.gacham, (Object)null))
                    {
                        this.gacham = MonoSingleton <GachaManager> .Instance;
                    }
                    this.Refresh();
                }
            }
        }