void Start() { rmData = GetComponent <RadarManager>(); rocketHUD = GameObject.Find("fake weapon hud").GetComponent <Image>();; rocketHUD.gameObject.SetActive(true); SpeedReadout = GameObject.Find("Speed"); throttleReadout = GameObject.Find("Throttle"); if (optionalDangerHeightReadout) { dangerBaseText = optionalDangerHeightReadout.text; } mFlash = GetComponent <MuzzleFlash>(); mFlash.Reset(); StartCoroutine(rocketSalvoRelease()); shootableScript = GetComponent <Shootable>(); wasHealth = startHealth = shootableScript.healthLimit; UI_ThrottleReadout = throttleReadout.GetComponent <UI_Speed> (); UI_SpeedReadout = SpeedReadout.GetComponent <UI_Speed> (); hardpointRef = missionTarget.GetComponentInChildren <HardPointCounter>(); hardpointMax = hardpointRef.hardpointCount; }
void Start() { this.gameActivated = false; this.currentPlayer = "None"; //PREINITIALIZE VARIABLES HERE scansRequiredText = displayPanel.transform.GetChild(0).GetComponent <Text>(); nextScanText = displayPanel.transform.GetChild(4).GetComponent <Text>(); scansLeftText = displayPanel.transform.GetChild(5).GetComponent <Text>(); numberText = displayPanel.transform.GetChild(8).GetComponent <Text>(); check = displayPanel.transform.GetChild(10).gameObject; cross = displayPanel.transform.GetChild(9).gameObject; nextScanBar = displayPanel.transform.GetChild(3).gameObject; scanTimeBar = displayPanel.transform.GetChild(7).gameObject; scanArea = displayPanel.transform.GetChild(1).gameObject; scansCompleted = displayPanel.transform.GetChild(11).gameObject; nextScanBarPos = nextScanBar.transform.localPosition.x; currentTimer = 0; numberOfScansLeft = 0; nextScanTimer = 0; randomAmount = 0; numberGuessed = 0; uiSpeed = UIScripts.GetComponent <UI_Speed>(); scansLeftText.text = "0"; this.displayPanel.SetActive(false); }
// Start is called before the first frame update void Start() { this.gameActivated = false; this.currentPlayer = "None"; this.systemHealth = 100; this.throttle = throttleReset; this.remainingWindows = 0; uiSpeed = UIScripts.GetComponent <UI_Speed>(); }
void Start() { rmData = GetComponent<RadarManager>(); rocketHUD = GameObject.Find ("fake weapon hud").GetComponent<Image>();; rocketHUD.gameObject.SetActive(true); SpeedReadout = GameObject.Find("Speed"); throttleReadout = GameObject.Find("Throttle"); if(optionalDangerHeightReadout) { dangerBaseText = optionalDangerHeightReadout.text; } mFlash = GetComponent<MuzzleFlash>(); mFlash.Reset(); StartCoroutine(rocketSalvoRelease()); shootableScript = GetComponent<Shootable>(); wasHealth = startHealth = shootableScript.healthLimit; UI_ThrottleReadout = throttleReadout.GetComponent<UI_Speed> (); UI_SpeedReadout = SpeedReadout.GetComponent<UI_Speed> (); hardpointRef = missionTarget.GetComponentInChildren<HardPointCounter>(); hardpointMax = hardpointRef.hardpointCount; }