コード例 #1
0
ファイル: Program.cs プロジェクト: pentiumx/HLSLTest
 /// <summary>
 /// アプリケーションのメイン エントリー ポイントです。
 /// </summary>
 static void Main(string[] args)
 {
     using (Game1 game = new Game1())
     {
         game.Run();
     }
 }
コード例 #2
0
ファイル: SoundControl.cs プロジェクト: pentiumx/HLSLTest
        public static void Initialize(Game1 game, ContentManager Content)
        {
            SoundControl.game = game;
            SoundControl.content = Content;
            menuMusic = content.Load<SoundEffect>("Audio\\BGM\\menu_new");
            menuMusicInstance = menuMusic.CreateInstance();

            menuMusicInstance.Volume = defVolume;
        }
コード例 #3
0
ファイル: RTSCamera.cs プロジェクト: pentiumx/HLSLTest
        public void Initialize(Game1 game, Vector3 target)
        {
            // カメラのオフセットを設定します
            DesiredPositionOffset = new Vector3(0.0f, 2000.0f, 3500.0f);
            //LookAtOffset = new Vector3(0.0f, 150.0f, 0.0f);// 少し上を見るように調整されてあるようだ
            LookAtOffset = new Vector3(0.0f, 25.0f, 0.0f);

            // カメラの視点を設定します
            NearPlaneDistance = 10.0f;
            FarPlaneDistance = 100000.0f;
            // カメラのアスペクト比を設定します
            // これは、グラフィック デバイスを初期化する base.Initalize() の
            // 呼び出しの後で行う必要があります。
            AspectRatio = (float)game.GraphicsDevice.Viewport.Width /
                game.GraphicsDevice.Viewport.Height;

            // カメラで初期リセットを実行し、静止位置で開始するようにます。これを行わないと、カメラは原点で開始し
            // 追尾対象オブジェクトを追ってワールド中を移動します。ここで実行する理由は、Reset でアスペクト比が必要になるためです。
            UpdateChaseTarget(target);
            Reset();
        }
コード例 #4
0
ファイル: Scene.cs プロジェクト: pentiumx/HLSLTest
 public static void Initialize(Game1 game, SpriteBatch spriteBatch, ContentManager Content)
 {
     Scene.game = game;
     Scene.spriteBatch = spriteBatch;
     Scene.content = Content;
     //choose = content.Load<SoundEffect>("Audio\\SE\\choose");
     //cancel = content.Load<SoundEffect>("Audio\\SE\\cancel"); //choose.Play(SoundControl.volumeAll, 0f, 0f);
 }
コード例 #5
0
 public BoundingSphereRenderer(Game1 game)
 {
     this.game = game;
 }