2014-12-17 14:47:17 +11:00
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace ClassicalSharp.Renderers {
|
|
|
|
|
|
|
|
|
|
/// <summary> Minimialistic environment renderer - only sets the clear colour to be sky colour.
|
|
|
|
|
/// (no fog, clouds, or proper overhead sky) </summary>
|
2015-05-15 16:22:30 +10:00
|
|
|
|
public class MinimalEnvRenderer : EnvRenderer {
|
2014-12-17 14:47:17 +11:00
|
|
|
|
|
2015-09-01 18:03:36 +10:00
|
|
|
|
public MinimalEnvRenderer( Game game ) {
|
|
|
|
|
this.game = game;
|
|
|
|
|
map = game.Map;
|
2014-12-17 14:47:17 +11:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void Render( double deltaTime ) {
|
2015-09-01 18:03:36 +10:00
|
|
|
|
graphics.ClearColour( map.SkyCol );
|
2014-12-17 14:47:17 +11:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void Init() {
|
|
|
|
|
base.Init();
|
2015-09-01 18:03:36 +10:00
|
|
|
|
graphics.Fog = false;
|
|
|
|
|
graphics.ClearColour( map.SkyCol );
|
2014-12-17 14:47:17 +11:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void OnNewMap( object sender, EventArgs e ) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void OnNewMapLoaded( object sender, EventArgs e ) {
|
2015-09-01 18:03:36 +10:00
|
|
|
|
graphics.ClearColour( map.SkyCol );
|
2014-12-17 14:47:17 +11:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void CloudsColourChanged() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void FogColourChanged() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void SkyColourChanged() {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|