private void Start() { m_inputManager = GetComponentInParent <MTK_InputManager>(); m_setup = GetComponentInParent <MTK_Setup>(); m_telekinesis = GetComponent <TelekinesisPointer>(); m_inputManager.m_onPad.AddListener(OnPad); }
private void Awake() { foreach (MTK_Setup setup in FindObjectsOfType <MTK_Setup>()) { if (setup.enabled) { activeSetup = setup; } } }
public void SetSetup(bool sim) { activeSetup = sim ? setupSimulation : setupSteamVR; activeSetup.gameObject.SetActive(true); activeSetup.UpdateSettings(); foreach (MTK_Setup setup in FindObjectsOfType <MTK_Setup>()) { if (setup != activeSetup) { setup.gameObject.SetActive(false); } } }
private void Awake() { Assert.IsTrue(m_room); Assert.IsTrue(m_newRoom); Assert.IsTrue(m_laserPrefab); Assert.IsTrue(transform.position == Vector3.zero, "Colonisator gameobject position must be zero"); Assert.IsTrue(transform.rotation == Quaternion.identity, "Colonisator gameobject rotation must be zero"); Assert.IsTrue(transform.lossyScale == Vector3.one, "Colonisator gameobject scale must be one"); Assert.IsTrue(m_newSegmentMaterial); m_manager = FindObjectOfType <MTK_Manager>(); m_setup = m_manager.activeSetup; m_newRoom.SetActive(false); }