コード例 #1
0
ファイル: UInventory.cs プロジェクト: Baensi/Assets
        // Режим редактора
        /// <summary>
        /// Выполняет update в режиме редактора-отладчика
        /// </summary>
        public void OnEditorUpdate(float debugWindowWidth, float debugWindowHeight)
        {
            this.debugWindowWidth  = debugWindowWidth;
            this.debugWindowHeight = debugWindowHeight;

            debugMode = true;

                if (eventData == null)
                    eventData = new EventContainer();

                if (selectCellImage == null || drawService == null || iconShadow==null || iconStyle ==null)
                    Start();

            redraw();
            popupMenu.redraw();
            toolTip.redraw();
        }
コード例 #2
0
ファイル: UInventory.cs プロジェクト: Baensi/Assets
        void Start()
        {
            selectCellImage  = DImageList.getInstance().getImage("inventory_selected_cell");
            correctCellImage = DImageList.getInstance().getImage("inventory_correct_cell");
            errorCellImage   = DImageList.getInstance().getImage("inventory_error_cell");

            drawService = new SlotDrawService(slots, iconStyle, iconShadow);

            eventData    = new EventContainer();
            selectedCell = new ItemPosition(-1, -1);

            popupMenu.SetupListeners(toolTip);

            #if UNITY_EDITOR
                debugMode = false;
            #endif
        }