Example #1
0
    private void GeneralControls()
    {
        if (!buttonHit)
        {
            cameraControl.MouseControls();
        }

        if (Input_Controller.GetTouch())
        {
            SetMousePos();
        }

        //Stores click location to prevent selecting a hex if the camera is being panned
        if (Input_Controller.GetTouchDown())
        {
            clickPos = mousePos;

            Select_UI_Object();
        }

        if (Input_Controller.GetTouchUp())
        {
            if (!buttonHit)
            {
                if (clickPos == mousePos)
                {
                    if (Game_Controller.Get_Game_State() == Game_Controller.gameState.PLAY)
                    {
                        Select_Object();
                    }
                }
            }
            else
            {
                buttonHit = null;
            }
        }

        if (Input.GetMouseButtonDown(1))
        {
            Selection_Object.Backup_Current_Selection();
        }
    }