ผลต่างระหว่างรุ่นของ "418383/418587 ภาคปลาย 2553/คะแนนการบ้าน 2"

จาก Theory Wiki
ไปยังการนำทาง ไปยังการค้นหา
แถว 135: แถว 135:
  
 
=== โค้ด LoadContent ใน PlayScreen.cs ===
 
=== โค้ด LoadContent ใน PlayScreen.cs ===
<table>
+
* 5210400433 กับ 5210404803
<tr>
+
[[ไฟล์:Breakout-playscreen-5210400433-5210404803.JPG|300px]]
<td align="center">5210400433</td>
 
<td align="center">5210404803</td>
 
</tr>
 
<tr>
 
<td>
 
<geshi lang="csharp">
 
            UInt16 oldLives;
 
            if (level == 0)
 
            {
 
                score = 0;
 
                oldLives = (UInt16)(Constants.INITIAL_REMAINING_LIVES); ;
 
                map = Game.Content.Load<Map>(Constants.MAP01_NAME);
 
                background = Game.Content.Load<Texture2D>(Constants.PLAY_SCREEN_BACKGROUND_NAME1);
 
                fontColor = Color.Black;
 
            }
 
            else if (level == 1)
 
            {
 
                sfx_instance = winner.CreateInstance();
 
                sfx_instance.Play();
 
                score = (UInt16)gameState.Score;
 
                oldLives = (UInt16)gameState.RemainingLives;
 
                map = Game.Content.Load<Map>(Constants.MAP02_NAME);
 
                background = Game.Content.Load<Texture2D>(Constants.PLAY_SCREEN_BACKGROUND_NAME2);
 
                fontColor = Color.Black;
 
 
 
            }
 
            else
 
            {
 
                sfx_instance = winner.CreateInstance();
 
                sfx_instance.Play();
 
                score = (UInt16)gameState.Score;
 
                oldLives = (UInt16)gameState.RemainingLives;
 
                map = Game.Content.Load<Map>(Constants.MAP03_NAME);
 
                background = Game.Content.Load<Texture2D>(Constants.PLAY_SCREEN_BACKGROUND_NAME3);
 
                fontColor = Color.White;
 
            }
 
</geshi>
 
</td>
 
<td>
 
<geshi lang="csharp">
 
            UInt16 oldLives;
 
            if (level == 0)
 
            {
 
               
 
                background = Game.Content.Load<Texture2D>(Constants.PLAY_SCREEN1_BACKGROUND_NAME);
 
                score = 0;
 
                oldLives = (UInt16)(Constants.INITIAL_REMAINING_LIVES); ;
 
                map = Game.Content.Load<Map>(Constants.MAP01_NAME);
 
            }
 
            else if (level == 1)
 
            {
 
                background = Game.Content.Load<Texture2D>(Constants.PLAY_SCREEN2_BACKGROUND_NAME);
 
                Music.SetSong2();
 
 
 
                score = (UInt16)gameState.Score;
 
                oldLives = (UInt16)gameState.RemainingLives;
 
                map = Game.Content.Load<Map>(Constants.MAP02_NAME);
 
            }
 
            else
 
            {
 
                Music.SetSong3();
 
                background = Game.Content.Load<Texture2D>(Constants.PLAY_SCREEN3_BACKGROUND_NAME);
 
                score = (UInt16)gameState.Score;
 
                oldLives = (UInt16)gameState.RemainingLives;
 
                map = Game.Content.Load<Map>(Constants.MAP03_NAME);
 
            }
 
</geshi>
 
</td>
 
</tr>
 
</table>
 
  
 
<!--
 
<!--

รุ่นแก้ไขเมื่อ 09:06, 20 มีนาคม 2554

คะแนน

คนที่ไม่ได้ 0 คะแนน

คนที่ได้ 0 คะแนนเนื่องจากลอกเพื่อนหรือให้เพื่อนลอก

การลอกกันที่ผมจับได้

โค้ดเปลี่ยนด่านใน PlayScreen.cs

51180537 51180628 51180727

<geshi lang="csharp">

               else if (playScreen.gameState.BrickCount <= 0)
               {
                 
                   
                   if (lv == 3)
                   {
                       Constants.MAP_NAME = "map03";


                   }
                   else
                   {
                       Constants.MAP_NAME = "map02";
                       lv = 3;
                   }
                   playScreen.LoadContent();
                   if (lv2 != 3)
                   {
                       lv2 += 1;
                       MediaPlayer.Stop();
                       MediaPlayer.Play(song3);
                       playScreen.Game.SwitchScreen(Constants.NEXT_LV_SCREEN_NAME);
          
                   }
                   else
                   {
                       lv = 1;
                       lv2 = 1;
                       Constants.MAP_NAME = "map01.txt";
                       playScreen.LoadContent();
                       playScreen.Game.SwitchScreen(Constants.GAME_CLEARED_SCREEN_NAME);
                   }
               }
               else if (playScreen.keySensor.IsKeyTyped(KeyMapping.pauseKey))
                   playScreen.ChangeState(playScreen.pauseState);
           }

</geshi>

<geshi lang="csharp">

               else if (playScreen.gameState.BrickCount <= 0)
               {
                   if (lv == 3)
                   {
                       Constants.MAP_NAME = "map03";
                       MediaPlayer.Stop();
                   }
                   else
                   {
                       Constants.MAP_NAME = "map02";
                       MediaPlayer.Stop();
                       lv = 3;
                   }
                   playScreen.LoadContent();
                   if (lv2 != 3)
                   {
                       lv2 += 1;
                       MediaPlayer.Play(song4);
                       playScreen.Game.SwitchScreen(Constants.NEXT_LV_SCREEN_NAME);
                   }
                   else
                   {
                       lv = 1;
                       lv2 = 1;
                       Constants.MAP_NAME = "map01";
                       MediaPlayer.Play(song5);
                       Constants.ascore = 0;
                       playScreen.LoadContent();
                       playScreen.Game.SwitchScreen(Constants.GAME_CLEARED_SCREEN_NAME);
                   }
               }
               else if (playScreen.keySensor.IsKeyTyped(KeyMapping.pauseKey))
                   playScreen.ChangeState(playScreen.pauseState);
           }

</geshi>

<geshi lang="csharp">

               else if (playScreen.gameState.BrickCount <= 0)
               {
                   if (lv == 3)
                   {
                       Constants.MAP_NAME = "map03";


                   }
                   else
                   {
                       Constants.MAP_NAME = "map02";
                       lv = 3;
                   }
                   playScreen.LoadContent();
                   if (lv2 != 3)
                   {
                       lv2 += 1;
                       playScreen.Game.SwitchScreen(Constants.NEXT_LV_SCREEN_NAME);
                   }
                   else
                   {
                       lv = 1;
                       lv2 = 1;
                       Constants.MAP_NAME = "map01.txt";
                       playScreen.Game.SwitchScreen(Constants.GAME_CLEARED_SCREEN_NAME);
                   }
               }
               else if (playScreen.keySensor.IsKeyTyped(KeyMapping.pauseKey))
                   playScreen.ChangeState(playScreen.pauseState);

</geshi>

โค้ด LoadContent ใน PlayScreen.cs

  • 5210400433 กับ 5210404803

Breakout-playscreen-5210400433-5210404803.JPG