예제 #1
0
파일: Player.cs 프로젝트: knocte/voxeliq
        public override void Initialize()
        {
            Logger.Trace("init()");

            this.FlyingEnabled = true;
            this.Weapon = new Shovel(Game);
            this.LoadContent();

            // import required services.
            this._camera = (ICamera) this.Game.Services.GetService(typeof (ICamera));
            this._chunkCache = (IChunkCache) this.Game.Services.GetService(typeof (IChunkCache));

            this.Weapon.Initialize();
        }
예제 #2
0
파일: Player.cs 프로젝트: hach-que/voxeliq
        public override void Initialize()
        {
            Logger.Trace("init()");

            this.FlyingEnabled = true;
            this.Weapon = new Shovel(Game);

            // import required services.
            this._camera = (ICamera) this.Game.Services.GetService(typeof (ICamera));
            this._chunkCache = (IChunkCache) this.Game.Services.GetService(typeof (IChunkCache));

            this._assetManager = (IAssetManager)this.Game.Services.GetService(typeof(IAssetManager));
            if (this._assetManager == null)
                throw new NullReferenceException("Can not find asset manager component.");

            this.LoadContent();

            this.Weapon.Initialize();
        }