private void Start()
        {
            m_CharacterController = GetComponent <CharacterController>();
            m_Camera = Camera.main;
            m_MouseLook.Init(transform, m_Camera.transform);

            // find debug canvas related objects
            Debug_Canvas   = GameObject.Find("DebugCanvasPhysics");
            InputMode_Text = GameObject.Find("DebugCanvasPhysics/InputModeText");

            InputFieldObj     = GameObject.Find("DebugCanvasPhysics/InputField");
            PhysicsController = gameObject.GetComponent <PhysicsRemoteFPSAgentController>();

            highlightController = new ObjectHighlightController(PhysicsController, MaxViewDistance, enableHighlightShader, true, MaxThrowForce, MaxChargeThrowSeconds);

            // if this component is enabled, turn on the targeting reticle and target text
            if (this.isActiveAndEnabled)
            {
                Debug_Canvas.GetComponent <Canvas>().enabled = true;
                Cursor.visible   = false;
                Cursor.lockState = CursorLockMode.Locked;
            }

            // FlightMode = PhysicsController.FlightMode;

#if UNITY_WEBGL
            FPSEnabled       = false;
            Cursor.visible   = true;
            Cursor.lockState = CursorLockMode.None;
            HideHUD();
#endif
        }
        void Start()
        {
            var Debug_Canvas = GameObject.Find("DebugCanvasPhysics");

            PhysicsController = gameObject.GetComponent <PhysicsRemoteFPSAgentController>();

            Cursor.visible   = true;
            Cursor.lockState = CursorLockMode.None;
            Debug_Canvas.GetComponent <Canvas>().enabled = true;

            highlightController = new ObjectHighlightController(PhysicsController, PhysicsController.maxVisibleDistance, true, false);
        }
Exemple #3
0
        void Start()
        {
            var Debug_Canvas = GameObject.Find("DebugCanvasPhysics");

            PhysicsController = gameObject.GetComponent <PhysicsRemoteFPSAgentController>();

            Cursor.visible   = true;
            Cursor.lockState = CursorLockMode.None;
            Debug_Canvas.GetComponent <Canvas>().enabled = true;

            highlightController = new ObjectHighlightController(PhysicsController, PhysicsController.maxVisibleDistance, true, false, 0, 0, true);
            highlightController.SetDisplayTargetText(false);

            // SpawnObjectToHide("{\"objectType\": \"Plunger\", \"objectVariation\": 1}");
        }