コード例 #1
0
ファイル: Program.cs プロジェクト: Aryn/Mobile-Fortress
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (MobileFortressClient game = new MobileFortressClient())
     {
         game.Run();
     }
 }
コード例 #2
0
ファイル: Camera.cs プロジェクト: Aryn/Mobile-Fortress
 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();
 }
コード例 #3
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (MobileFortressClient game = new MobileFortressClient())
     {
         game.Run();
     }
 }
コード例 #4
0
ファイル: Camera.cs プロジェクト: Aryn/Mobile-Fortress
 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();
 }
コード例 #5
0
ファイル: Camera.cs プロジェクト: Aryn/Mobile-Fortress
 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);
 }
コード例 #6
0
ファイル: Camera.cs プロジェクト: Aryn/Mobile-Fortress
        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);
        }
コード例 #7
0
ファイル: Game1.cs プロジェクト: Aryn/Mobile-Fortress
 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);
 }
コード例 #8
0
ファイル: Game1.cs プロジェクト: Aryn/Mobile-Fortress
 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);
 }
コード例 #9
0
ファイル: Network.cs プロジェクト: Aryn/Mobile-Fortress
        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";
        }
コード例 #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";
        }