Example #1
0
        public override void Initialize()
        {
            Logger.Trace("init()");

            // import required services.
            this._cameraController = (ICameraControlService) this.Game.Services.GetService(typeof (ICameraControlService));
            this._player = (IPlayer) this.Game.Services.GetService(typeof (IPlayer));

            this._cameraController.LookAt(Vector3.Down);
            this._player.SpawnPlayer(new Vector2Int(0, 0));

            base.Initialize();
        }
Example #2
0
        public override void Initialize()
        {
            Logger.Trace("init()");

            // import required services.
            this._cameraController = (ICameraControlService)this.Game.Services.GetService(typeof(ICameraControlService));
            this._player           = (IPlayer)this.Game.Services.GetService(typeof(IPlayer));

            this._cameraController.LookAt(Vector3.Down);
            this._player.SpawnPlayer(new Vector2Int(0, 0));

            base.Initialize();
        }
Example #3
0
        public override void Initialize()
        {
            Logger.Trace("init()");

            // import required services.
            this._cameraController =
                (ICameraControlService)this.Game.Services.GetService(typeof(ICameraControlService));
            this._player = (IPlayer)this.Game.Services.GetService(typeof(IPlayer));

            //this.ChunkBuilder = new QueuedBuilder(this.Game, this._player, this); // the chunk builder.
            //this.Game.Components.Add(this.ChunkBuilder);

            this._cameraController.LookAt(Vector3.Down);
            this._player.SpawnPlayer(new Vector2Int(1000, 1000));

            base.Initialize();
        }
Example #4
0
        /// <summary>
        /// Initializes the input manager.
        /// </summary>
        public override void Initialize()
        {
            Logger.Trace("init()");

            // import required services.
            this._world                 = (IWorld)this.Game.Services.GetService(typeof(IWorld));
            this._player                = (IPlayer)this.Game.Services.GetService(typeof(IPlayer));
            this._graphicsManager       = (IGraphicsManager)this.Game.Services.GetService(typeof(IGraphicsManager));
            this._cameraController      = (ICameraControlService)this.Game.Services.GetService(typeof(ICameraControlService));
            this._ingameDebuggerService = (IInGameDebuggerService)this.Game.Services.GetService(typeof(IInGameDebuggerService));
            this._fogger                = (IFogger)this.Game.Services.GetService(typeof(IFogger));
            this._skyService            = (ISkyService)this.Game.Services.GetService(typeof(ISkyService));
            this._chunkCache            = (IChunkCache)this.Game.Services.GetService(typeof(IChunkCache));
            this._bloomService          = (IBloomService)this.Game.Services.GetService(typeof(IBloomService));

            // get current mouse & keyboard states.
            this._previousKeyboardState = Keyboard.GetState();
            this._previousMouseState    = Mouse.GetState();

            base.Initialize();
        }
Example #5
0
        /// <summary>
        /// Initializes the input manager.
        /// </summary>
        public override void Initialize()
        {
            Logger.Trace("init()");

            // import required services.
            this._world = (IWorld) this.Game.Services.GetService(typeof (IWorld));
            this._player = (IPlayer) this.Game.Services.GetService(typeof (IPlayer));
            this._graphicsManager = (IGraphicsManager) this.Game.Services.GetService(typeof (IGraphicsManager));
            this._cameraController = (ICameraControlService) this.Game.Services.GetService(typeof (ICameraControlService));
            this._ingameDebuggerService =(IInGameDebuggerService) this.Game.Services.GetService(typeof (IInGameDebuggerService));
            this._fogger = (IFogger) this.Game.Services.GetService(typeof (IFogger));
            this._skyService = (ISkyService) this.Game.Services.GetService(typeof (ISkyService));
            this._chunkCache = (IChunkCache) this.Game.Services.GetService(typeof (IChunkCache));
            this._bloomService = (IBloomService) this.Game.Services.GetService(typeof (IBloomService));

            // get current mouse & keyboard states.
            this._previousKeyboardState = Keyboard.GetState();
            this._previousMouseState = Mouse.GetState();

            base.Initialize();
        }
Example #6
0
        public override void Initialize()
        {
            Logger.Trace("init()");

            // import required services.
            this._cameraController =
                (ICameraControlService) this.Game.Services.GetService(typeof (ICameraControlService));
            this._player = (IPlayer) this.Game.Services.GetService(typeof (IPlayer));

            //this.ChunkBuilder = new QueuedBuilder(this.Game, this._player, this); // the chunk builder.
            //this.Game.Components.Add(this.ChunkBuilder);

            this._cameraController.LookAt(Vector3.Down);
            this._player.SpawnPlayer(new Vector2Int(1000, 1000));

            base.Initialize();
        }