public void Start() { // find Van der Graaf Generator object in the scene GameObject vandeGraaff = GameObject.FindGameObjectWithTag("VandeGraaff"); if (null != vandeGraaff) { this.vandeGraaffController = vandeGraaff.GetComponent <VandeGraaffController>(); } // find Grounder object in the scene GameObject grounder = GameObject.FindGameObjectWithTag("Grounder"); if (null != grounder) { this.grounderController = grounder.GetComponent <GrounderController>(); } // find Balloon object in the scene GameObject balloon = GameObject.FindGameObjectWithTag("Balloon"); if (null != balloon) { this.balloonGlowController = balloon.GetComponent <BalloonGlowController>(); } this.EnableGlow(this.glowEnabled); // define GUI style this.textStyle = new GUIStyle("label"); this.textStyle.alignment = TextAnchor.MiddleCenter; }
public void Start() { // find Van de Graaff Generator object in the scene GameObject vandeGraaff = GameObject.FindGameObjectWithTag("VandeGraaff"); if (null != vandeGraaff) { this.vandeGraaffController = vandeGraaff.GetComponent <VandeGraaffController>(); } // find Grounder object in the scene GameObject grounder = GameObject.FindGameObjectWithTag("Grounder"); if (null != grounder) { this.grounderController = grounder.GetComponent <GrounderController>(); } // find Paper Stripes object in the scene GameObject paperStripes = GameObject.FindGameObjectWithTag("PaperStripes"); if (null != paperStripes) { this.paperStripesController = paperStripes.GetComponent <PaperStripesController>(); } this.EnableGlow(this.glowEnabled); // define GUI style this.textStyle = new GUIStyle("label"); this.textStyle.alignment = TextAnchor.MiddleCenter; var system = OpenVR.System; if (system != null) { controllerLeftIndex = SteamVR_Controller.GetDeviceIndex(SteamVR_Controller.DeviceRelation.Leftmost); controllerRightIndex = SteamVR_Controller.GetDeviceIndex(SteamVR_Controller.DeviceRelation.Rightmost); } }