Ejemplo n.º 1
0
 // Use this for initialization
 void Start()
 {
     switchR = GameObject.Find("switchR").GetComponent <RedSwitchScript> ();
     switchG = GameObject.Find("switchG").GetComponent <GreenSwitchScript> ();
     switchB = GameObject.Find("switchB").GetComponent <BlueSwitchScript> ();
     chest   = transform.parent.GetComponentInChildren <ChestScript>();
 }
Ejemplo n.º 2
0
 void Start()
 {
     spriteRend = this.GetComponent <SpriteRenderer> ();
     deactivate();
     name       = gameObject.name;
     switchR    = GameObject.Find("switchR").GetComponent <RedSwitchScript> ();
     switchB    = GameObject.Find("switchB").GetComponent <BlueSwitchScript> ();
     trapSwitch = GameObject.Find("trap1").GetComponent <TrapSwitchT2Script> ();
 }