// Use this for initialization void Start() { script = targetOb.GetComponent <PressurePadTarget>(); child = this.gameObject.transform.GetChild(0).gameObject; player = GameObject.Find("Player"); audioSource = GetComponent <AudioSource>(); }
// Use this for initialization void Start() { script = attachedOb.GetComponent <PressurePadTarget>(); audioSource = GetComponent <AudioSource>(); // rend.material.color = new Color(1, 0, 0, 1); for (int i = 0; i < transform.childCount; i++) { transform.GetChild(i).GetComponent <Renderer>().material.color = new Color(0.7f, 0, 0, 1); } }
// Use this for initialization void Start() { script = attachedOb.GetComponent <PressurePadTarget>(); rend = gameObject.GetComponent <Renderer>(); audioSource = GetComponent <AudioSource>(); }
// Use this for initialization void Start() { thisScript = this.gameObject.GetComponent <PlatformSink>(); targetScript = targetOb.GetComponent <PressurePadTarget>(); }