void Start() { GameObject colorControllerObj = GameObject. FindGameObjectWithTag ("ColorController"); bulletSource = GameObject. FindGameObjectWithTag ("BulletSource"); colorController = colorControllerObj.GetComponent<ColorControllerUI> (); }
void Start() { bulletSource = GameObject.FindGameObjectWithTag("BulletSource"); shooting = bulletSource.GetComponent<Shooting> (); colorSwitcher = GameObject.FindGameObjectWithTag("ColorController"); colorController = colorSwitcher.GetComponent<ColorControllerUI> (); rectCorners = new Vector3[4]; shootingImg.GetComponent<RectTransform> ().GetWorldCorners (rectCorners); }