void Start() { animLaser = this.gameObject.GetComponent <Animator> (); FPC = GameObject.Find("FPSController").GetComponent <FirstPersonController>(); FPcam = GameObject.Find("FirstPersonCharacter").GetComponent <Camera> (); Lasercam = this.gameObject.GetComponentInChildren <Camera> (); TriHUD = GameObject.Find("TricorderHUD").GetComponent <TricorderHUD> (); ui = GameObject.Find("ObjectivesUI").GetComponent <ObjectivesUI> (); lppc = GameObject.Find("LaserPartsHunt").GetComponent <LaserPartsPickupController> (); bc = GameObject.Find("BridgeController").GetComponent <BridgeController> (); mcs = GameObject.Find("DontDestroyonLoad").GetComponent <MasterControlScript> (); pauseMenu = GameObject.Find("PauseMenu").GetComponent <PauseMenu> (); }
// Use this for initialization void Awake() { mUiTextElements = GetComponentsInChildren <Text>(); mProgressBars = GetComponentsInChildren <ProgressBar>(); mItemBar = GetComponentInChildren <ItemBar>(); mObjectivesUI = GetComponentInChildren <ObjectivesUI>(); Debug.Assert(mObjectivesUI != null); Debug.Assert(mUiTextElements != null); Debug.Assert(mProgressBars != null); Debug.Assert(mItemBar != null); Debug.Assert(itemBar != null && objectiveBar != null && timeBar != null); mTextRotationCorutines = new IEnumerator[mUiTextElements.Length]; Instance = this; }
// ------------------------------------------------------------------------------------- // void Start() { ui = GameObject.Find("ObjectivesUI").GetComponent <ObjectivesUI> (); }