Пример #1
0
        void Update()
        {
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                if (BuildManager.UseDragNDrop() && BuildManager.InDragNDrop())
                {
                    return;
                }
                if (!UITowerView.IsOn() && !AbilityManager.IsSelectingTarget() && !UIPerkMenu.IsOn() && !UIFPS.IsOn())
                {
                    TogglePause();
                }
            }

            //keyboard for cursor based input start here
            if (!enableInput)
            {
                return;
            }

            if (Input.touchCount > 1)
            {
                return;
            }
            if (UI.IsCursorOnUI(0) || UI.IsCursorOnUI())
            {
                return;
            }

            if (Input.GetMouseButtonDown(0))
            {
                OnCursorDown(Input.mousePosition);
            }
        }
Пример #2
0
        void Update()
        {
            if (FPSControl.IsInFPSMode())
            {
                return;
            }
            if (AbilityManager.IsSelectingTarget())
            {
                return;
            }

            //if(!disableCursorIndicator)
            BuildManager.SetTileIndicator(Input.mousePosition);
        }