public void Fall() { // //Gポイントを消費する gameMgr.gPoint -= consumeGPoint; //もしスタートアイテムだったらゲームを開始する if (isStartItem) { gameMgr.ChangeGameMode(GameState.maingame); } //Vector3 diff = (this.star.transform.position - this.transform.position).normalized; //this.transform.rotation = Quaternion.FromToRotation(Vector3.up, diff); //初期速度の設定(差をとって正規化) Vector2 vec_sub = (Vector2)(transform.position - star.transform.position); vec_sub.Normalize(); //落とす rb.velocity = -vec_sub * firstspeed; // rb.AddForce(-vec_sub * force_amount); GetComponentInParent <ItemGenerator>().FloatingItemList.Remove(this); isFalling = true; }