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(); }
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(); }