コード例 #1
0
ファイル: map_block.cs プロジェクト: usagi/xna-morijobi-win
 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();
 }
コード例 #2
0
        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();
        }
コード例 #3
0
ファイル: test.cs プロジェクト: tykz/xna-morijobi-win
        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();
        }
コード例 #4
0
ファイル: base_plane.cs プロジェクト: tykz/xna-morijobi-win
 public base_plane(Game game, simple3D.game_objects.polar_camera camera)
     : base(game)
 {
     Debug.Assert(camera != null);
     this.camera = camera;
 }