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>(); }
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>(); }
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>(); }