Exemplo n.º 1
0
        private void Start()
        {
            // Mirror is kinda whack
            if (!hasAuthority)
            {
                Destroy(this);
            }

            camera   = CameraManager.singleton.examineCamera;
            selector = camera.GetComponent <CompositeItemSelector>();

            Assert.IsNotNull(UiPrefab);
            uiInstance = Instantiate(UiPrefab);
            examineUi  = uiInstance.GetComponent <ExamineUI>();
        }
Exemplo n.º 2
0
        private void Start()
        {
            // Mirror is kinda whack
            if (!hasAuthority)
            {
                Destroy(this);
            }

            // Establish our minimum frequency timer. This is used to ensure
            // that objects moving into our cursor are detected.
            updateFrequency = 1f / MIN_UPDATES_PER_SECOND;
            updateTimer     = 0f;

            camera   = CameraManager.singleton.examineCamera;
            selector = camera.GetComponent <CompositeItemSelector>();

            Assert.IsNotNull(UiPrefab);
            uiInstance = Instantiate(UiPrefab);
            examineUi  = uiInstance.GetComponent <ExamineUI>();
        }
Exemplo n.º 3
0
        private void Start()
        {
            // Prevent duplicate examinators from being in the scene in multiplayer.
            if (!isLocalPlayer)
            {
                Destroy(this);
                return;
            }

            // Establish our minimum frequency timer. This is used to ensure
            // that objects moving into our cursor are detected.
            updateFrequency = 1f / MIN_UPDATES_PER_SECOND;
            updateTimer     = 0f;

            camera   = CameraManager.singleton.examineCamera;
            selector = camera.GetComponent <CompositeItemSelector>();

            Assert.IsNotNull(UiPrefab);
            uiInstance = Instantiate(UiPrefab);
            examineUi  = uiInstance.GetComponent <ExamineUI>();
        }