Пример #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>();
        }
Пример #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>();
        }
Пример #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>();
        }