Ejemplo n.º 1
0
 private void OnShuttleModePressed(ShuttleMode obj)
 {
     SendMessage(new ShuttleModeRequestMessage()
     {
         Mode = obj
     });
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Sets the shuttle's movement mode. Does minimal revalidation.
        /// </summary>
        private void SetShuttleMode(ShuttleMode mode, ShuttleConsoleComponent consoleComponent,
                                    ShuttleComponent shuttleComponent, TransformComponent?consoleXform = null)
        {
            // Re-validate
            if (!this.IsPowered(consoleComponent.Owner, EntityManager) ||
                !Resolve(consoleComponent.Owner, ref consoleXform) ||
                !consoleXform.Anchored ||
                consoleXform.GridID != Transform(shuttleComponent.Owner).GridID)
            {
                return;
            }

            shuttleComponent.Mode = mode;

            switch (mode)
            {
            case ShuttleMode.Strafing:
                break;

            case ShuttleMode.Cruise:
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
Ejemplo n.º 3
0
 public ShuttleConsoleBoundInterfaceState(
     ShuttleMode mode,
     float maxRange,
     EntityCoordinates?coordinates,
     Angle?angle,
     List <DockingInterfaceState> docks) : base(maxRange, coordinates, angle, docks)
 {
     Mode = mode;
 }