public virtual void Load(VMContextMarshal input) { Blueprint = new Blueprint(input.Architecture.Width, input.Architecture.Height); Architecture = new VMArchitecture(input.Architecture, this, Blueprint); Clock = new VMClock(input.Clock); if (VM.UseWorld) { foreach (var active in input.Ambience.ActiveSounds) { Ambience.SetAmbience(active, true); } World.State.WorldSize = input.Architecture.Width; Blueprint.Terrain = new TerrainComponent(new Rectangle(1, 1, input.Architecture.Width - 2, input.Architecture.Height - 2)); Blueprint.Terrain.Initialize(this.World.State.Device, this.World.State); World.InitBlueprint(Blueprint); } RandomSeed = input.RandomSeed; }
public virtual void Load(VMContextMarshal input) { Blueprint = new Blueprint(input.Architecture.Width, input.Architecture.Height); Architecture = new VMArchitecture(input.Architecture, this, Blueprint); Clock = new VMClock(input.Clock); if (VM.UseWorld) { foreach (var active in input.Ambience.ActiveSounds) Ambience.SetAmbience(active, true); World.State.WorldSize = input.Architecture.Width; Blueprint.Terrain = new TerrainComponent(new Rectangle(1, 1, input.Architecture.Width - 2, input.Architecture.Height - 2)); Blueprint.Terrain.Initialize(this.World.State.Device, this.World.State); World.InitBlueprint(Blueprint); } RandomSeed = input.RandomSeed; }