示例#1
0
    public void DeployMenuPanel(int Startx, int Starty)
    {
        cont       = 1;
        RotX       = -1;
        RotY       = -1;
        panelStats = GameObject.Find("PanelStatistics");
        bool AuxZoom = GameObject.Find("Camera").GetComponent <CameraController>().ZoomLim;

        if (panelSave.activeInHierarchy || panelLoad.activeInHierarchy || panelColor.activeInHierarchy || panel.activeInHierarchy || panelEdit.activeInHierarchy || panelStats != null)
        {
            ModificarXY = false;
        }
        else
        {
            ModificarXY = true;
            Piece p     = ControllerBoard.GetPiece(Startx, Starty);
            Piece pOpen = ControllerBoard.GetPiece(ControllerBoard.openX, ControllerBoard.openY);
            //activa opciones
            if (x == -1 && y == -1 && ready)
            {
                btnShow.SetActive(false);
                MenuStickers.SetActive(true);
                if (inventory.activeCat)
                {
                    inventory.showC = false;
                }
                if (inventory.activeInv)
                {
                    inventory.showI = false;
                }
                GameObject.Find("Camera").GetComponent <CameraController>().mover = false;
                panelSociedad.SetActive(false);
                x = Startx;
                y = Starty;

                ready = false;
            }
            else if (x == Startx && y == Starty && !ready || !AuxZoom)  //desactiva opciones
            {
                MenuPanel.SetActive(false);
                x     = -1;
                y     = -1;
                ready = true;
                GameObject.Find("Camera").GetComponent <CameraController>().mover = true;
            }
        }
    }
示例#2
0
    public void DestroyGameObjectButton()  //FDDM
    {
        PanelConfirmacion1.SetActive(true);
        PanelConfirmacion1.transform.GetChild(0).GetComponent <Text>().text = "Desea Eliminar el componente actual?";
        btnYes1.GetComponent <Button>().onClick.AddListener(() => {
            ControllerBoard.DestroyFarm(x, y);
            x     = -1;
            y     = -1;
            ready = true;
            MenuStickers.SetActive(false);
            PanelConfirmacion1.SetActive(false);
            ReturnZoom();
            GameObject.Find("Camera").GetComponent <CameraController>().mover = true;
        });

        btnNo1.GetComponent <Button>().onClick.AddListener(() => {
            PanelConfirmacion1.SetActive(false);
        });
    }//FDDM
示例#3
0
    }//FDDM

    public void ReturnZoom()  //FDDM
    {
        Camera.StartCoroutine("Reset");
        MenuStickers.SetActive(false);
        btnShow.SetActive(true);
        panelSociedad.SetActive(true);
        if (inventory.activeCat)
        {
            inventory.showC = true;
        }
        if (inventory.activeInv)
        {
            inventory.showI = true;
        }

        x     = -1;
        y     = -1;
        ready = true;
        GameObject.Find("Camera").GetComponent <CameraController>().mover = true;
    }//FDDM
示例#4
0
    void Start()
    {
        cont          = 1;
        x             = -1;
        y             = -1;
        RotX          = 0;
        RotY          = 0;
        move          = true;
        ready         = true;
        destroy       = false;
        rotate        = false;
        rnd           = true;
        isWhite       = false;
        buttonColor   = false;
        buttonEdition = false;
        buttonInfo    = false;
        ModificarXY   = true;
        guardadoTut   = false;
        ButtonVisAct  = false;
        BandEnter     = false;
        BandOnClick   = false;

        //FDDM
        fieldBSTotalC = GameObject.Find("InputField");                   //Input del menu editar para la cantidad de componentes
        textTC        = GameObject.Find("TextTC").GetComponent <Text>(); //Texto que esta en la ventana que solicita la cantidad de elementos del componente.
        //FDDM

        btnSave         = GameObject.Find("ButtonSaveEdition");
        showPanel       = GameObject.Find("PanelEdition").GetComponent <CanvasGroup>();
        fieldS          = GameObject.Find("InputSaveEdition");
        panelEdit       = GameObject.Find("PanelEdition");
        ControllerBoard = GameObject.Find("Tablero").GetComponent <ControllerBoard>();
        tablero         = GameObject.Find("Tablero");
        panelSave       = GameObject.Find("PanelGuardar");
        panel           = GameObject.Find("PanelInfo");
        panelLoad       = GameObject.Find("PanelCargar");
        panelProc       = GameObject.Find("PanelProcesos");
        panelInfo       = GameObject.Find("PanelInfo");
        panelColor      = GameObject.Find("PanelChangeColor");
        textStatus      = GameObject.Find("TextStatusEdition").GetComponent <Text>();
        panelSociedad   = GameObject.Find("sociedad");
        inventory       = GameObject.Find("Inventory").GetComponent <Inventory>();
        Camera          = GameObject.Find("Camera").GetComponent <CameraController>();
        btnShow         = GameObject.Find("ShowCategory");
        panelEdit.SetActive(false);
        panelColor.SetActive(false);
        BSTotalC           = GameObject.Find("ButtonSaveTotalC");
        MenuStickers       = GameObject.Find("MenuStickers");
        MenuFicha          = GameObject.Find("PanelFicha");
        PanelSupport       = GameObject.Find("PanelSoporte");
        PanelConfirmacion  = GameObject.Find("PanelConfirmacion");
        PanelConfirmacion1 = GameObject.Find("PanelConfirmacion1");
        btnYes1            = GameObject.Find("Yes1");
        btnNo1             = GameObject.Find("No1");
        btnYes             = GameObject.Find("Yes");
        btnNo = GameObject.Find("No");
        MenuStickers.SetActive(false);
        MenuFicha.SetActive(false);
        PanelSupport.SetActive(false);
        PanelConfirmacion.SetActive(false);
        PanelConfirmacion1.SetActive(false);
    }