void Start()
 {
     if (isField == true)
     {
         fieldScript = GetComponent <LightningFieldScript>();
     }
     else
     {
         boltScript = GetComponent <LightningBoltShapeConeScript>();
     }
     player = GameManager.singleton.Player.GetComponent <Player>();
 }
Beispiel #2
0
 public void Start()
 {
     this.sound = this.GetComponent <AudioSource> ();
     if (null == this.sound)
     {
         throw new System.Exception("No AudioSource attached to TeslaTrafo GameObject");
     }
     this.lightning = this.GetComponentInChildren <LightningBoltShapeConeScript> ();
     if (null == this.lightning)
     {
         throw new System.Exception("No LightningBoltShapeConeScript found");
     }
     if (null != this.Bulbs)
     {
         this.bulbsPointLights = this.Bulbs.GetComponentsInChildren <Light>();
     }
 }