private void GEngine(Vector3D output) { //TODO 六向重力控制 foreach (IMyGravityGenerator GG in GGs) { switch (Directions[GG]) { case Base6Directions.Direction.Forward: GG.SetValue("Gravity", Convert.ToSingle(output.Z)); break; case Base6Directions.Direction.Backward: GG.SetValue("Gravity", Convert.ToSingle(-output.Z)); break; case Base6Directions.Direction.Left: GG.SetValue("Gravity", Convert.ToSingle(output.X)); break; case Base6Directions.Direction.Right: GG.SetValue("Gravity", Convert.ToSingle(-output.X)); break; case Base6Directions.Direction.Down: GG.SetValue("Gravity", Convert.ToSingle(output.Y)); break; case Base6Directions.Direction.Up: GG.SetValue("Gravity", Convert.ToSingle(-output.Y)); break; } } }