Demo3作成
@@ -0,0 +1,21 @@ | ||
1 | +using System; | |
2 | + | |
3 | +namespace MikuMikuDanceXNADemo3 | |
4 | +{ | |
5 | +#if WINDOWS || XBOX | |
6 | + static class Program | |
7 | + { | |
8 | + /// <summary> | |
9 | + /// アプリケーションのメイン エントリー ポイントです。 | |
10 | + /// </summary> | |
11 | + static void Main(string[] args) | |
12 | + { | |
13 | + using (Game1 game = new Game1()) | |
14 | + { | |
15 | + game.Run(); | |
16 | + } | |
17 | + } | |
18 | + } | |
19 | +#endif | |
20 | +} | |
21 | + |
@@ -0,0 +1,34 @@ | ||
1 | +using System.Reflection; | |
2 | +using System.Runtime.CompilerServices; | |
3 | +using System.Runtime.InteropServices; | |
4 | + | |
5 | +// アセンブリに関する全般的な情報は、以下の一連の属性によって管理されます。 | |
6 | +// アセンブリに関連付けられている情報を変更するには、これらの属性値を変更します。 | |
7 | +// | |
8 | +[assembly: AssemblyTitle("MikuMikuDanceXNADemo3")] | |
9 | +[assembly: AssemblyProduct("MikuMikuDanceXNADemo3")] | |
10 | +[assembly: AssemblyDescription("")] | |
11 | +[assembly: AssemblyCompany("")] | |
12 | +[assembly: AssemblyCopyright("Copyright © 2011")] | |
13 | +[assembly: AssemblyTrademark("")] | |
14 | +[assembly: AssemblyCulture("")] | |
15 | + | |
16 | +// ComVisible 属性を False に設定すると、このアセンブリに含まれる型が | |
17 | +// COM コンポーネントに公開されません。COM からこのアセンブリの型にアクセスする必要がある場合は、 | |
18 | +// その型の ComVisible 属性を True に設定してください。 | |
19 | +// Windows アセンブリだけが COM に対応しています。 | |
20 | +[assembly: ComVisible(false)] | |
21 | + | |
22 | +// Windows 上では、このプロジェクトが COM に公開されている場合、 次の GUID が typelib の ID として設定されます。 | |
23 | +// Windows 以外のプラットフォームでは、このアセンブリをデバイスに展開するときに | |
24 | +// タイトル ストレージ コンテナーを一意に識別するために使用します。 | |
25 | +[assembly: Guid("9b44585d-c488-4e00-bcdc-3af626c23165")] | |
26 | + | |
27 | +// アセンブリのバージョン情報は、次の 4 つの値で構成されています。 | |
28 | +// | |
29 | +// メジャー バージョン | |
30 | +// マイナー バージョン | |
31 | +// ビルド番号 | |
32 | +// リビジョン番号 | |
33 | +// | |
34 | +[assembly: AssemblyVersion("1.0.0.0")] |
@@ -0,0 +1,91 @@ | ||
1 | +using System; | |
2 | +using System.Collections.Generic; | |
3 | +using System.Linq; | |
4 | +using Microsoft.Xna.Framework; | |
5 | +using Microsoft.Xna.Framework.Audio; | |
6 | +using Microsoft.Xna.Framework.Content; | |
7 | +using Microsoft.Xna.Framework.GamerServices; | |
8 | +using Microsoft.Xna.Framework.Graphics; | |
9 | +using Microsoft.Xna.Framework.Input; | |
10 | +using Microsoft.Xna.Framework.Media; | |
11 | + | |
12 | +namespace MikuMikuDanceXNADemo3 | |
13 | +{ | |
14 | + /// <summary> | |
15 | + /// 基底 Game クラスから派生した、ゲームのメイン クラスです。 | |
16 | + /// </summary> | |
17 | + public class Game1 : Microsoft.Xna.Framework.Game | |
18 | + { | |
19 | + GraphicsDeviceManager graphics; | |
20 | + SpriteBatch spriteBatch; | |
21 | + | |
22 | + public Game1() | |
23 | + { | |
24 | + graphics = new GraphicsDeviceManager(this); | |
25 | + Content.RootDirectory = "Content"; | |
26 | + } | |
27 | + | |
28 | + /// <summary> | |
29 | + /// ゲームが実行を開始する前に必要な初期化を行います。 | |
30 | + /// ここで、必要なサービスを照会して、関連するグラフィック以外のコンテンツを | |
31 | + /// 読み込むことができます。base.Initialize を呼び出すと、使用するすべての | |
32 | + /// コンポーネントが列挙されるとともに、初期化されます。 | |
33 | + /// </summary> | |
34 | + protected override void Initialize() | |
35 | + { | |
36 | + // TODO: ここに初期化ロジックを追加します。 | |
37 | + | |
38 | + base.Initialize(); | |
39 | + } | |
40 | + | |
41 | + /// <summary> | |
42 | + /// LoadContent はゲームごとに 1 回呼び出され、ここですべてのコンテンツを | |
43 | + /// 読み込みます。 | |
44 | + /// </summary> | |
45 | + protected override void LoadContent() | |
46 | + { | |
47 | + // 新規の SpriteBatch を作成します。これはテクスチャーの描画に使用できます。 | |
48 | + spriteBatch = new SpriteBatch(GraphicsDevice); | |
49 | + | |
50 | + // TODO: this.Content クラスを使用して、ゲームのコンテンツを読み込みます。 | |
51 | + } | |
52 | + | |
53 | + /// <summary> | |
54 | + /// UnloadContent はゲームごとに 1 回呼び出され、ここですべてのコンテンツを | |
55 | + /// アンロードします。 | |
56 | + /// </summary> | |
57 | + protected override void UnloadContent() | |
58 | + { | |
59 | + // TODO: ここで ContentManager 以外のすべてのコンテンツをアンロードします。 | |
60 | + } | |
61 | + | |
62 | + /// <summary> | |
63 | + /// ワールドの更新、衝突判定、入力値の取得、オーディオの再生などの | |
64 | + /// ゲーム ロジックを、実行します。 | |
65 | + /// </summary> | |
66 | + /// <param name="gameTime">ゲームの瞬間的なタイミング情報</param> | |
67 | + protected override void Update(GameTime gameTime) | |
68 | + { | |
69 | + // ゲームの終了条件をチェックします。 | |
70 | + if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed) | |
71 | + this.Exit(); | |
72 | + | |
73 | + // TODO: ここにゲームのアップデート ロジックを追加します。 | |
74 | + | |
75 | + base.Update(gameTime); | |
76 | + } | |
77 | + | |
78 | + /// <summary> | |
79 | + /// ゲームが自身を描画するためのメソッドです。 | |
80 | + /// </summary> | |
81 | + /// <param name="gameTime">ゲームの瞬間的なタイミング情報</param> | |
82 | + protected override void Draw(GameTime gameTime) | |
83 | + { | |
84 | + GraphicsDevice.Clear(Color.CornflowerBlue); | |
85 | + | |
86 | + // TODO: ここに描画コードを追加します。 | |
87 | + | |
88 | + base.Draw(gameTime); | |
89 | + } | |
90 | + } | |
91 | +} |