void Start() { target = GameObject.Find("RotSheet").transform; greenSheet = GameObject.Find("GreenSheet").GetComponent <GreenSheet>(); boxCollision = GameObject.Find("BoxCollision").GetComponent <BoxCollision>(); audioSource = gameObject.GetComponent <AudioSource>(); }
void Start() { sheet = gameObject.GetComponent <Renderer>(); { GameObject obj = GameObject.Find("RedSheet"); redSheet = obj.GetComponent <RedSheet>(); } { GameObject obj = GameObject.Find("GreenSheet"); greenSheet = obj.GetComponent <GreenSheet>(); } }