/** * ボールとバーを初期化する。 */ protected void InitBallAndBar() { ball = (GameObject)Instantiate(ballPrefab, new Vector3(0, 0, 0), Quaternion.identity); ball.GetComponent <Ball>().InitPosition(); bar.AlignCenter(); }