Exemplo n.º 1
0
    bool ButtonReceiving()
    {
        if (Input.GetMouseButtonUp(TheManager.TM.LEFT_MOUSE))
        {
            if (!TranslationMode())
            {
                return(false);
            }
            if (!dcf.mLoc.CastIntoAll(dcf.worldCam))
            {
                return(false);
            }
        }
        if (Input.GetMouseButton(TheManager.TM.RIGHT_MOUSE))
        {
            EnableMovement move = gameObject.AddComponent <EnableMovement>();
            DeactivateOnSwitch();
            move.SetEnableMovement(dcf, TheManager.TM.RIGHT_MOUSE, transform, this, dcf.modes.move.activeOnSwitch);
            return(false);
        }
        if (Input.GetMouseButton(TheManager.TM.MIDDLE_MOUSE))
        {
        }

        return(true);
    }
Exemplo n.º 2
0
    bool ButtonReceiving()
    {
        if (Input.GetMouseButtonUp(TheManager.TM.LEFT_MOUSE))
        {
            editee.GetComponentInChildren <MeshRenderer>().material = editee.myMat;
            Ray mray = dcf.worldCam.ScreenPointToRay(Input.mousePosition);

            if (!TranslationMode())
            {
                dcf.mLoc.CastIntoAll(dcf.worldCam);
                return(false);
            }
        }
        if (Input.GetMouseButton(TheManager.TM.RIGHT_MOUSE))
        {
            //EdittingMode move = new EnableMovement(dcf, TheManager.TM.RIGHT_MOUSE, dcf.transform, this);
            EnableMovement move = gameObject.AddComponent <EnableMovement>();
            DeactivateOnSwitch();
            move.SetEnableMovement(dcf, TheManager.TM.RIGHT_MOUSE, transform, this, dcf.modes.move.activeOnSwitch);
            return(false);
        }
        if (Input.GetMouseButton(TheManager.TM.MIDDLE_MOUSE))
        {
        }

        return(true);
    }
Exemplo n.º 3
0
    bool ButtonReceiving()
    {
        if (Input.GetMouseButtonUp(TheManager.TM.LEFT_MOUSE))
        {
            EnableStartRot esr = gameObject.AddComponent <EnableStartRot>();
            DeactivateOnSwitch();
            esr.SetEnableStartRot(dcf, this, dcf.modes.esr.activeOnSwitch, editee);
            return(false);
        }
        if (Input.GetMouseButton(TheManager.TM.RIGHT_MOUSE))
        {
            EnableMovement move = gameObject.AddComponent <EnableMovement>();
            DeactivateOnSwitch();
            move.SetEnableMovement(dcf, TheManager.TM.RIGHT_MOUSE, transform, this, dcf.modes.move.activeOnSwitch);
            return(false);
        }
        if (Input.GetMouseButton(TheManager.TM.MIDDLE_MOUSE))
        {
        }

        return(true);
    }