Example #1
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (MobileFortressClient game = new MobileFortressClient())
     {
         game.Run();
     }
 }
Example #2
0
 public static void Setup(MobileFortressClient game, PhysicsObj target, Vector3 offset)
 {
     Target = target;
     Offset = offset;
     Projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.ToRadians(90), game.GraphicsDevice.Viewport.AspectRatio, 0.1f, 700f);
     Seaplane = new Seaplane();
 }
Example #3
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (MobileFortressClient game = new MobileFortressClient())
     {
         game.Run();
     }
 }
Example #4
0
 public static void Setup(MobileFortressClient game, PhysicsObj target, Vector3 offset)
 {
     Target     = target;
     Offset     = offset;
     Projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.ToRadians(90), game.GraphicsDevice.Viewport.AspectRatio, 0.1f, 700f);
     Seaplane   = new Seaplane();
 }
Example #5
0
 public static void CustomizationSetup(MobileFortressClient game, Vector3 offset)
 {
     Offset = offset;
     float aspectRatio = 4f / 3f;
     float height = .09f;
     float vertical = -.035f;
     Projection = Matrix.CreatePerspectiveOffCenter(-height * aspectRatio, height * aspectRatio, -height+vertical, height+vertical, 0.1f, 700f);
     View = Matrix.CreateLookAt(Offset, Vector3.Zero, Vector3.Up);
 }
Example #6
0
        public static void CustomizationSetup(MobileFortressClient game, Vector3 offset)
        {
            Offset = offset;
            float aspectRatio = 4f / 3f;
            float height      = .09f;
            float vertical    = -.035f;

            Projection = Matrix.CreatePerspectiveOffCenter(-height * aspectRatio, height * aspectRatio, -height + vertical, height + vertical, 0.1f, 700f);
            View       = Matrix.CreateLookAt(Offset, Vector3.Zero, Vector3.Up);
        }
Example #7
0
 public MobileFortressClient()
 {
     graphics = new GraphicsDeviceManager(this);
     Controls.Instance = new Controls();
     graphics.SynchronizeWithVerticalRetrace = false;
     graphics.PreferredBackBufferWidth = 800;
     graphics.PreferredBackBufferHeight = 600;
     Content.RootDirectory = "Content";
     Game = this;
     EventInput.Initialize(this.Window);
     this.Exiting += new EventHandler<EventArgs>(Shutdown);
 }
Example #8
0
 public MobileFortressClient()
 {
     graphics          = new GraphicsDeviceManager(this);
     Controls.Instance = new Controls();
     graphics.SynchronizeWithVerticalRetrace = false;
     graphics.PreferredBackBufferWidth       = 800;
     graphics.PreferredBackBufferHeight      = 600;
     Content.RootDirectory = "Content";
     Game = this;
     EventInput.Initialize(this.Window);
     this.Exiting += new EventHandler <EventArgs>(Shutdown);
 }
Example #9
0
        public static void Initialize(MobileFortressClient game)
        {
            Game = game;
            NetPeerConfiguration config = new NetPeerConfiguration("Mobile Fortress");
            config.EnableMessageType(NetIncomingMessageType.DiscoveryResponse);
            config.EnableMessageType(NetIncomingMessageType.UnconnectedData);
            config.EnableMessageType(NetIncomingMessageType.WarningMessage);
            config.EnableMessageType(NetIncomingMessageType.DebugMessage);
            //config.EnableUPnP = true;
            config.Port = Port;
            config.SimulatedMinimumLatency = 0.0025f;
            config.SimulatedRandomLatency = 0.002f;
            config.SimulatedLoss = 0.0001f;

            Client = new NetClient(config);
            Client.Start();
            NetworkAddress = "127.0.0.1";
        }
Example #10
0
        public static void Initialize(MobileFortressClient game)
        {
            Game = game;
            NetPeerConfiguration config = new NetPeerConfiguration("Mobile Fortress");

            config.EnableMessageType(NetIncomingMessageType.DiscoveryResponse);
            config.EnableMessageType(NetIncomingMessageType.UnconnectedData);
            config.EnableMessageType(NetIncomingMessageType.WarningMessage);
            config.EnableMessageType(NetIncomingMessageType.DebugMessage);
            //config.EnableUPnP = true;
            config.Port = Port;
            config.SimulatedMinimumLatency = 0.0025f;
            config.SimulatedRandomLatency  = 0.002f;
            config.SimulatedLoss           = 0.0001f;

            Client = new NetClient(config);
            Client.Start();
            NetworkAddress = "127.0.0.1";
        }