コード例 #1
0
        // Start is called before the first frame update
        void Awake()
        {
            thisVaribleHolder = this;
            if (InteractImage == null)
            {
                InteractImage = GameObject.Find("InteractUI");
            }
            if (InteractImage2 == null)
            {
                InteractImage2 = GameObject.Find("interactEandQ");
            }
            Projecter = GameObject.Find("ButtonPillarInteract");
            //OnlyRaycasetVersion
            //MainCam = GameObject.Find("Camera").GetComponent<Camera>();


            TextBox = GameObject.Find("TextBox");

            // InteractImage.SetActive(false);
            //InteractImage2.SetActive(false);

            WhiteBoards = GameObject.FindGameObjectsWithTag("WhiteBoard");

            //TextBox.transform.parent.gameObject.SetActive(false);
        }
コード例 #2
0
 // Update is called once per frame
 void Update()
 {
     if (varibleHolder == null)
     {
         varibleHolder = GameObject.Find("VaribleHolder").GetComponent <VaribleHolder>();
     }
 }
コード例 #3
0
        public void GoToSpawn()
        {
            if (varibleHolderScript == null)
            {
                varibleHolderScript = GameObject.Find("VaribleHolder").GetComponent <VaribleHolder>();

                Transform[] spawns = varibleHolderScript.Spawns;
                int         rng    = Random.Range(0, 3);
                transform.position = spawns[rng].transform.position;
            }
        }
コード例 #4
0
 // Start is called before the first frame update
 void Start()
 {
     if (!isLocalPlayer)
     {
         this.enabled = false;
     }
     else
     {
         if (isServer)
         {
             varibleHolder = VaribleHolder.thisVaribleHolder;
             Cam           = GameObject.Find("ModelingCamera");
             this.enabled  = false;
         }
         else
         {
             varibleHolder = VaribleHolder.thisVaribleHolder;
             Cam           = GameObject.Find("ModelingCamera");
             this.enabled  = false;
         }
     }
 }
コード例 #5
0
        public void Start()
        {
            myUrl = "www.google.com";
            if (!isLocalPlayer)
            {
                VaribleHolderScript = GameObject.Find("VaribleHolder").GetComponent <VaribleHolder>();

                Modeling3DCam = VaribleHolderScript.Modeling3DCam;

                ModelingUICam = VaribleHolderScript.ModelingUICam;

                Modeling3DUI = VaribleHolderScript.Modeling3DUI;

                MainCam = GetComponent <Controls>().directionObject.GetComponent <Camera>();

                GameObjSelectMenu3D = VaribleHolderScript.GameObjSelectMenu3D;

                GameObjSelectMenuUI = VaribleHolderScript.UIObjSelect;

                ModelingUI = GetComponent <ModelingUI>().gameObject;

                Modeling3DObj = VaribleHolderScript.Modeling3DObj;

                MainCanvas = VaribleHolderScript.MainCanvas;

                HUD = VaribleHolderScript.HUD;

                browersScript = VaribleHolderScript.browersScript;

                InteractImage  = VaribleHolderScript.InteractImage;
                InteractImage2 = VaribleHolderScript.InteractImage2;
                Projecter      = VaribleHolderScript.Projecter;


                //OnlyRaycasetVersion
                // MainCam = VaribleHolderScript.MainCam;

                GameObject.Find("ShowOthers").GetComponent <Button>().onClick.AddListener(() => ShowOthers());
                TextBox = VaribleHolderScript.TextBox;


                WhiteBoards = VaribleHolderScript.WhiteBoards;

                for (int i = 0; i < WhiteBoards.Length; i++)
                {
                    //   TextBox.GetComponent<TMPro.TMP_InputField>().onEndEdit.AddListener(delegate { CmdUpdateWhiteBoardText(TextBox.GetComponent<TMPro.TMP_InputField>().text, WhiteBoards[i]); });
                }
                this.enabled = false;
            }
            else
            {
                VaribleHolderScript = GameObject.Find("VaribleHolder").GetComponent <VaribleHolder>();

                Modeling3DCam = VaribleHolderScript.Modeling3DCam;

                ModelingUICam = VaribleHolderScript.ModelingUICam;

                Modeling3DUI = VaribleHolderScript.Modeling3DUI;

                MainCam = GetComponent <Controls>().directionObject.GetComponent <Camera>();

                GameObjSelectMenu3D = VaribleHolderScript.GameObjSelectMenu3D;

                GameObjSelectMenuUI = VaribleHolderScript.UIObjSelect;

                ModelingUI = VaribleHolderScript.ModelingUI;

                Modeling3DObj = VaribleHolderScript.Modeling3DObj;

                MainCanvas = VaribleHolderScript.MainCanvas;

                HUD = VaribleHolderScript.HUD;

                browersScript = VaribleHolderScript.browersScript;

                InteractImage  = VaribleHolderScript.InteractImage;
                InteractImage2 = VaribleHolderScript.InteractImage2;
                Projecter      = VaribleHolderScript.Projecter;

                // GameObject.Find("ShowOthers").GetComponent<Button>().onClick.AddListener(() => TestUrl());
                GameObject.Find("ShowOthers").GetComponent <Button>().onClick.AddListener(() => ShowOthers());
                //OnlyRaycasetVersion
                // MainCam = VaribleHolderScript.MainCam;


                TextBox = VaribleHolderScript.TextBox;


                WhiteBoards = VaribleHolderScript.WhiteBoards;

                for (int i = 0; i < WhiteBoards.Length; i++)
                {
                    //   TextBox.GetComponent<TMPro.TMP_InputField>().onEndEdit.AddListener(delegate { CmdUpdateWhiteBoardText(TextBox.GetComponent<TMPro.TMP_InputField>().text, WhiteBoards[i]); });
                }
            }
            // InteractImage.SetActive(false);
            // InteractImage2.SetActive(false);
        }
コード例 #6
0
 // Start is called before the first frame update
 private void Awake()
 {
     VaribleHolderScript = VaribleHolder.thisVaribleHolder;
     LastUrl             = "www.google.com";
 }
コード例 #7
0
        // Update is called once per frame
        void Update()
        {
            if (varibleHolder == null)
            {
                varibleHolder = VaribleHolder.thisVaribleHolder;
            }

            if (!VaribleHolder.LocalPlayer.GetComponent <NetworkIdentity>().isLocalPlayer)
            {
                return;
            }

            ThisColour = varibleHolder.Colour3D.GetComponent <ColourUISelect>().ColorOfUI;
            if (Input.GetKeyDown(KeyCode.E))
            {
                TrasfromState++;

                if (TrasfromState > 2)
                {
                    TrasfromState = 0;
                }
            }
            if (Input.GetKeyDown(KeyCode.Q))
            {
                TrasfromState--;

                if (TrasfromState < 0)
                {
                    TrasfromState = 2;
                }
            }

            if (Input.GetKeyDown(KeyCode.H))
            {
                if (modelUIScript.InteractionScript.HUD.activeInHierarchy == true)
                {
                    modelUIScript.InteractionScript.HUD.SetActive(false);
                }
                else
                {
                    modelUIScript.InteractionScript.HUD.SetActive(true);
                }
            }

            switch (TrasfromState)
            {
            case 0:
                TransformStateString = "Position";
                break;

            case 1:
                TransformStateString = "Rotation";
                break;

            case 2:
                TransformStateString = "Scale";
                break;

            default:
                TransformStateString = "Position";
                break;
            }

            if (Input.GetKey(KeyCode.T))
            {
                Speed = Speed + 4 * Time.deltaTime;
            }
            if (Input.GetKey(KeyCode.G))
            {
                Speed = Speed - 4 * Time.deltaTime;
            }

            if (Input.GetKey(KeyCode.Mouse1))
            {
                ObjSelectUI = varibleHolder.GameObjSelectMenu3D;
                ObjSelectUI.SetActive(true);
            }
        }