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() { if (null == sparkingStartPoint || null == sparkingStartPoint.transform) { throw new System.Exception("No sparking start point GameObject found"); } if (null == sparkingEndPoint || null == sparkingEndPoint.transform) { throw new System.Exception("No sparking end point GameObject found"); } if (null != vandeGraaff) { this.vandeGraaffController = vandeGraaff.GetComponent <VandeGraaffController>(); } this.sound = gameObject.GetComponent <AudioSource> (); }
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); } }
public void Start() { this.chargeScript = charge.GetComponent <StaticChargeScript> (); this.vandeGraaffController = chargeInducer.GetComponent <VandeGraaffController> (); }