public override void Initialize() { Logger.Trace("init()"); this._camera = (ICamera)this.Game.Services.GetService(typeof(ICamera)); this._fogger = (IFogger)this.Game.Services.GetService(typeof(IFogger)); this._assetManager = (IAssetManager)this.Game.Services.GetService(typeof(IAssetManager)); if (this._assetManager == null) { throw new NullReferenceException("Can not find asset manager component."); } var colors = TextureTo2DArray(_assetManager.CloudTexture); for (int x = 0; x < size; x++) { for (int z = 0; z < size; z++) { this.Clouds[x, z] = colors[x, z] == Color.White; //float cloudiness = SimplexNoise.noise(x*0.009f, 0, z*0.009f)*1f; //this.Clouds[x, z] = cloudiness > 0.5f; } } base.Initialize(); }
/// <summary> /// Initializes the statistics service. /// </summary> public override void Initialize() { Logger.Trace("init()"); // import required services. this._player = (IPlayer)this.Game.Services.GetService(typeof(IPlayer)); this._fogger = (IFogger)this.Game.Services.GetService(typeof(IFogger)); this._world = (IWorld)this.Game.Services.GetService(typeof(IWorld)); this._chunkStorage = (IChunkStorage)this.Game.Services.GetService(typeof(IChunkStorage)); this._chunkCache = (IChunkCache)this.Game.Services.GetService(typeof(IChunkCache)); base.Initialize(); }
public override void Initialize() { Logger.Trace("init()"); // import required services. this._chunkStorage = (IChunkStorage)this.Game.Services.GetService(typeof(IChunkStorage)); this._camera = (ICamera)this.Game.Services.GetService(typeof(ICamera)); this._player = (IPlayer)this.Game.Services.GetService(typeof(IPlayer)); this._fogger = (IFogger)this.Game.Services.GetService(typeof(IFogger)); this.VertexBuilder = (IVertexBuilder)this.Game.Services.GetService(typeof(IVertexBuilder)); this._timeRuler = (TimeRuler)this.Game.Services.GetService(typeof(TimeRuler)); this.Generator = new BiomedTerrain(new RainForest()); base.Initialize(); }
/// <summary> /// Initializes the debug-bar service. /// </summary> public override void Initialize() { Logger.Trace("init()"); // import required services. this._player = (IPlayer)this.Game.Services.GetService(typeof(IPlayer)); this._fogger = (IFogger)this.Game.Services.GetService(typeof(IFogger)); this._world = (IWorld)this.Game.Services.GetService(typeof(IWorld)); this._chunkStorage = (IChunkStorage)this.Game.Services.GetService(typeof(IChunkStorage)); 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."); } base.Initialize(); }
public override void Initialize() { Logger.Trace("init()"); // import required services. this._chunkStorage = (IChunkStorage) this.Game.Services.GetService(typeof (IChunkStorage)); this._camera = (ICamera) this.Game.Services.GetService(typeof (ICamera)); this._player = (IPlayer) this.Game.Services.GetService(typeof (IPlayer)); this._fogger = (IFogger) this.Game.Services.GetService(typeof (IFogger)); this.VertexBuilder = (IVertexBuilder) this.Game.Services.GetService(typeof (IVertexBuilder)); this._timeRuler = (TimeRuler) this.Game.Services.GetService(typeof (TimeRuler)); this._assetManager = (IAssetManager)this.Game.Services.GetService(typeof(IAssetManager)); if (this._assetManager == null) throw new NullReferenceException("Can not find asset manager component."); this.Generator = new BiomedTerrain(new RainForest()); base.Initialize(); }
/// <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(); }
public override void Initialize() { Logger.Trace("init()"); // import required services. this._chunkStorage = (IChunkStorage) this.Game.Services.GetService(typeof (IChunkStorage)); this._camera = (ICamera) this.Game.Services.GetService(typeof (ICamera)); this._player = (IPlayer) this.Game.Services.GetService(typeof (IPlayer)); this._fogger = (IFogger) this.Game.Services.GetService(typeof (IFogger)); this.VertexBuilder = (IVertexBuilder) this.Game.Services.GetService(typeof (IVertexBuilder)); this._timeRuler = (TimeRuler) this.Game.Services.GetService(typeof (TimeRuler)); this.Generator = new BiomedTerrain(new RainForest()); base.Initialize(); }
public override void Initialize() { Logger.Trace("init()"); this._camera = (ICamera)this.Game.Services.GetService(typeof(ICamera)); this._fogger = (IFogger)this.Game.Services.GetService(typeof(IFogger)); this._assetManager = (IAssetManager)this.Game.Services.GetService(typeof(IAssetManager)); if (this._assetManager == null) throw new NullReferenceException("Can not find asset manager component."); var colors = TextureTo2DArray(_assetManager.CloudTexture); for (int x = 0; x < size; x++) { for (int z = 0; z < size; z++) { this.Clouds[x, z] = colors[x, z] == Color.White; //float cloudiness = SimplexNoise.noise(x*0.009f, 0, z*0.009f)*1f; //this.Clouds[x, z] = cloudiness > 0.5f; } } base.Initialize(); }
/// <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(); }
/// <summary> /// Initializes the debug-bar service. /// </summary> public override void Initialize() { Logger.Trace("init()"); // import required services. this._player = (IPlayer)this.Game.Services.GetService(typeof(IPlayer)); this._fogger = (IFogger)this.Game.Services.GetService(typeof(IFogger)); this._world = (IWorld)this.Game.Services.GetService(typeof(IWorld)); this._chunkStorage = (IChunkStorage)this.Game.Services.GetService(typeof(IChunkStorage)); 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."); base.Initialize(); }
/// <summary> /// Initializes the statistics service. /// </summary> public override void Initialize() { Logger.Trace("init()"); // import required services. this._player = (IPlayer) this.Game.Services.GetService(typeof (IPlayer)); this._fogger = (IFogger) this.Game.Services.GetService(typeof (IFogger)); this._world = (IWorld) this.Game.Services.GetService(typeof (IWorld)); this._chunkStorage = (IChunkStorage) this.Game.Services.GetService(typeof (IChunkStorage)); this._chunkCache = (IChunkCache) this.Game.Services.GetService(typeof (IChunkCache)); base.Initialize(); }
public FoggerCommand() { this._fogger = (IFogger)Core.Engine.Instance.Game.Services.GetService(typeof(IFogger)); }
public FoggerCommand() { this._fogger = (IFogger)Engine.Instance.Game.Services.GetService(typeof(IFogger)); }