public UserInterface(SimEngine sim) : base(sim) { this.sim = sim; DrawOrder = 3; UpdateOrder = 0; }
bool cameraBelowCenter; // camera is below the current weather region's center public Weather(SimEngine sim) { this.sim = sim; g = sim.GraphicsDevice; camera = sim.UI.Camera; camera.Moved += new EventHandler(UpdateRegions); }
/* * Methods */ // Intializer public ParticleSim(Canvas simCanvas) { this.simCanvas = simCanvas; graphicsManager = new GraphicsManager(simCanvas); bodyManager = new BodyManager(graphicsManager); simEngine = new SimEngine(bodyManager); }
public World(SimEngine sim) : base(sim) { DrawOrder = 1; this.sim = sim; dayTimeRatio = MathHelper.TwoPi / (secondsPerDay * 1000); }
public Vegetation(SimEngine sim, BuildData data) { this.sim = sim; treeDensity = data.TreeDensity; density = data.VegetationDensity; grassDrawFadeEndDist = Sim.Settings.Graphics.Default.GrassDrawDist; grassDrawFadeStartDist = 0.8f * grassDrawFadeEndDist; treeDrawFadeEndDist = Sim.Settings.Graphics.Default.TreeDrawDist; treeDrawFadeStartDist = 0.8f * treeDrawFadeEndDist; }
public void BuildEffect(Type weatherType, int numParticles, float drawDist, SimEngine sim) { if (weatherType == typeof(Rain)) WeatherEffect = new Rain(); else if (weatherType == typeof(Snow)) WeatherEffect = new Snow(); WeatherEffect.LoadContent(sim.Content, sim.GraphicsDevice); WeatherEffect.Build(new Cube(new Vector3(Base.X,0,Base.Y), ceiling, Base.Width, Base.Height), numParticles, sim.GraphicsDevice); WeatherEffect.Effect.Parameters["fDrawDist"].SetValue(drawDist * 0.9f); }
public Terrain(BuildData data, SimEngine sim) { this.sim = sim; this.heightmap = data.Heightmap; this.scale = data.TerrainScale; this.g = sim.GraphicsDevice; this.camera = sim.UI.Camera; this.smooths = data.Smoothing; hmRatio = (float)heightmap.Height / heightmap.Width; }
public Camera(SimEngine sim) { this.gDevice = sim.GraphicsDevice; pView = Shaders.Common.Parameters["matView"]; pProjection = Shaders.Common.Parameters["matProjection"]; pViewProjection = Shaders.Common.Parameters["matViewProjection"]; pPosition = Shaders.Common.Parameters["vCamPos"]; UpdateProjectionMatrix(); UpdateRotationMatrix(); UpdateViewMatrix(); }
public void BuildEffect(Type weatherType, int numParticles, float drawDist, SimEngine sim) { if (weatherType == typeof(Rain)) { WeatherEffect = new Rain(); } else if (weatherType == typeof(Snow)) { WeatherEffect = new Snow(); } WeatherEffect.LoadContent(sim.Content, sim.GraphicsDevice); WeatherEffect.Build(new Cube(new Vector3(Base.X, 0, Base.Y), ceiling, Base.Width, Base.Height), numParticles, sim.GraphicsDevice); WeatherEffect.Effect.Parameters["fDrawDist"].SetValue(drawDist * 0.9f); }
public Water(SimEngine sim) { this.sim = sim; }
public WorldBuilder(SimEngine sim, BuildData data) { this.sim = sim; this.data = data; }
public Console(SimEngine sim) { this.sim = sim; area = new Rectangle(0, 0, sim.GraphicsDevice.Viewport.Width, (int)font.MeasureString("|").Y); cursor = new Rectangle(0, area.Bottom - 2, (int)font.MeasureString(" ").X, 2); }
public Sky(SimEngine sim) { this.sim = sim; }