public map_block(Game game, simple3D.game_objects.polar_camera camera) : base(game) { Debug.Assert(camera != null); this.camera = camera; position_velocity_ = -Vector3.UnitY * height * 10; bounding_unit = new Vector3(floor_length, height_, floor_length); update_bounding(); }
public override void Initialize() { se_collision = Game.Content.Load<SoundEffect>(@"misc\metal-attack"); camera = new simple3D.game_objects.polar_camera(Game); components.Add(camera); components.Add(new simple3D.game_objects.axes(Game, camera)); var r = new Random(); for (var n = 16; n > 0; --n) components.Add(new star(Game, camera, r)); base.Initialize(); }
public override void Initialize() { components.Add(camera = new simple3D.game_objects.polar_camera(Game)); map_image = Game.Content.Load<Texture2D>(@"rpg\map_test"); map_image_data = new Color[map_image.Width * map_image.Height]; map_image.GetData(map_image_data); Debug.Assert(map_image_data.Count() > 0); components.Add(new base_plane(Game, camera)); on_update_first += generate_map_block; on_update_first += check_exit; on_update_first += camera_update; on_update_last += collisions; base.Initialize(); }
public base_plane(Game game, simple3D.game_objects.polar_camera camera) : base(game) { Debug.Assert(camera != null); this.camera = camera; }