void Start() { chargeScriptBalloon = chargeBalloon.GetComponent <StaticChargeScript>(); chargeScriptGlassrod = chargeGlassrod.GetComponent <StaticChargeScript>(); balloonLight = glowBalloon.GetComponent <Light>(); glassrodLights = glowGlassrod.GetComponentsInChildren <Light>(); }
public void Start() { this.chargeScript = charge.GetComponent <StaticChargeScript> (); // Randomly set initial charge of ballon - positive or negative if (Random.Range(0, 2) > 0) { this.chargeScript.strength *= -1f; } this.sound = gameObject.GetComponent <AudioSource> (); }
public void Start() { // Get the Van de Graaff Static Charge Script this.chargeScript = charge.GetComponent <StaticChargeScript> (); // Get the Static Charge Handles of the induced objects this.inducedObjectsCharge = new List <ICharge> (); foreach (GameObject inducedObject in this.inducedObjects) { if (null != inducedObject) { this.inducedObjectsCharge.Add(inducedObject.GetComponent <ICharge>()); } } // Get the Field Line Scripts this.fieldLineScripts = this.fieldLines.GetComponentsInChildren <FieldLineScript> (); }
public void Start() { this.chargeScript = charge.GetComponent <StaticChargeScript> (); }
void Start() { chargeScript = charge.GetComponent <StaticChargeScript>(); }
public void Start() { this.chargeScript = charge.GetComponent <StaticChargeScript> (); this.vandeGraaffController = chargeInducer.GetComponent <VandeGraaffController> (); }