public void StartPattern() { gameControl = GameObject.Find("GameControl").GetComponent("GameControl") as GameControl; gp = GameObject.Find("GameControl").GetComponent<GamePlay>(); gp.Bonus = false; transform.position = new Vector3(18, gp.lastFlowY, transform.position.z); gp.LastP = transform.gameObject; c = transform.FindChild("Coin").GetComponent("CoinSet") as CoinSet; c.TurnCoin(true); check = true; end = false; }