//Assign list value to blocks based on color tags void Start() { parentBlock = transform.parent.GetComponent <BlockMove>(); Color = GameObject.FindObjectOfType <RunwayManager>(); switch (this.transform.parent.tag) { case "GreenBlock": activeColor = 0; break; case "RedBlock": activeColor = 1; break; case "BlueBlock": activeColor = 2; break; case "BlackBlock": activeColor = 3; break; default: break; } }
public void UpdatePosition(double lat, double lon, float altSL) { if (SettingsPanel.ILSMode == 1) { lineHor.enabled = false; lineVer.enabled = false; siteNameText.enabled = false; return; } float horTan; float verTan; var runway = RunwayManager.FindNearestRunway(lat, lon, altSL, "Kerbin", out horTan, out verTan); //Debug.Log(runway); if (runway == null) { lineHor.enabled = false; lineVer.enabled = false; siteNameText.enabled = false; } else { lineHor.enabled = true; lineVer.enabled = true; siteNameText.enabled = true; siteNameText.text = runway.GetIdStr(); //runway.AssessBias(lat, lon, altSL, out horTan, out verTan); //Debug.Log("bias: h-v " + horTan + " , " + verTan); lineHor.transform.localPosition = lineHor.transform.localPosition.SetX(Mathf.Clamp(-horTan / 0.12f, -0.4f, 0.4f)); lineVer.transform.localPosition = lineVer.transform.localPosition.SetY(Mathf.Clamp(-verTan / 0.2f, -0.4f, 0.4f)); } }
void Start() { if (Application.loadedLevelName.Contains("Boss")) { isBossLevel = true; } rigidbody = GetComponent <Rigidbody>(); canQuickDrop = true; curPos = transform.position; xMin = curPos.x - 1; xMax = curPos.x + 1; StartCoroutine("ResumeFall"); Color = GameObject.FindObjectOfType <RunwayManager>(); switch (this.transform.tag) { case "GreenBlock": activeColor = 0; colorName = "Green"; break; case "RedBlock": activeColor = 1; colorName = "Red"; break; case "BlueBlock": activeColor = 2; colorName = "Blue"; break; case "BlackBlock": activeColor = 3; colorName = "Black"; break; default: break; } meshRendComponents = GetComponentsInChildren <MeshRenderer> (); if (gameObject.name.Contains("Black")) { //Debug.Log("Get particles and set into array."); particleComponents = GetComponentsInChildren <ParticleSystem>(); } }
public SettingsWindow() { InitializeComponent(); rw = new RunwayManager(); }
void Start() { RunwayManager.Init(); }