/// <summary>
        /// Initializes the renderer.
        /// </summary>
        protected override void Initialize()
        {
            this.CameraMovementSpeed = DefaultProperties.CameraMovementSpeed;
            this.CameraRotationSpeed = DefaultProperties.CameraRotationSpeed;

            Thread.CurrentThread.Name = "MMO3D Rendering Thread";

            this.Engine = new GameEngine(this.GraphicsDevice, new PackFileContentManager(new ContentManager(this.Services)));
            this.Engine.InEditorMode = true;
            this.Engine.Initialize();

            this.Engine.MainPlayer = new Player(null);
            this.Engine.MainPlayer.DisplayName = "Terrain Explorer Object";

            this.chaseCamera = new ChaseCamera(this.Engine.MainPlayer);
            this.chaseCamera.CameraDistance = 15;
            this.chaseCamera.HeightDifference = 6;

            this.Engine.CurrentCamera = this.chaseCamera;
        }
示例#2
0
        /// <summary>
        /// Initializes the game.
        /// </summary>
        protected override void Initialize()
        {
            Thread.CurrentThread.Name = "MMO3D Rendering Thread";

            this.Engine = new GameEngine(this.GraphicsDevice, new PackFileContentManager(new ContentManager(this.Services)));
            this.Engine.FakeFullScreenForm = this.Parent as System.Windows.Forms.Form;
            this.Engine.Initialize();

            this.Engine.Content = new PackFileContentManager(this.Engine.Content.ServiceProvider, "GameData");

            this.Engine.Fonts.Add(this.Engine.FontCreator.CreateFont(new FontDefinition()));

            this.Resize += new EventHandler(this.MMO3DRenderer_Resize);

            this.Engine.MainPlayer = new Player(ExtendedModel.Load(this.Engine.Content, "models.mc->orienter"));
            this.Engine.MainPlayer.DisplayName = "Main Player";

            this.Engine.CurrentCamera = this.chaseCamera = new ChaseCamera(this.Engine.MainPlayer) { CameraDistance = 6, HeightDifference = 1.5f };

            this.Network = new NetworkClient();
            this.Network.PacketReceived += this.Network_Received;

            this.interfaceManager = new InterfaceManager(this.Engine, this.Network, this);
        }