/// <summary> /// The main entry point for the application. /// </summary> static void Main(string[] args) { using (MobileFortressClient game = new MobileFortressClient()) { game.Run(); } }
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(); }
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); }
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); }
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); }
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); }
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"; }