Changeset 7027
- Timestamp:
- 2015-07-24 12:14:34 (8 years ago)
- Location:
- 2015/30/EmilL
- Files:
-
- 7 added
- 1 deleted
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
2015/30/EmilL/KariO/KariO/KariO/KariO.cs
r6989 r7027 8 8 using Jypeli.Widgets; 9 9 10 public class KariO : PhysicsGame 10 /// @author Emil Lehmuskoski 11 /// @version 1.0 12 /// <summary> 13 /// Apple Rush 14 /// </summary> 15 public class AppleRush : PhysicsGame 11 16 { 12 17 const double nopeus = 200; … … 14 19 const int RUUDUN_KOKO = 40; 15 20 16 int kenttänumero = 4; 21 Font Fontti = LoadFont("SpriteFont1"); 22 23 int kenttänumero = 1; 17 24 18 25 List< Vector> Hyppypaikka =new List<Vector> (); … … 30 37 Image HaamuKuva = LoadImage("Haamu"); 31 38 Image RäjähdysKuva = LoadImage("Räjähdys"); 39 Image taustaKuva2 = LoadImage("Taustakuva2"); 32 40 SoundEffect maaliAani = LoadSoundEffect("KeräysÄäni"); 33 41 SoundEffect RäjähdysÄäni = LoadSoundEffect("Explosion31"); … … 37 45 { 38 46 SmoothTextures = false; 39 Aloitapeli();47 LisaaAlkuvalikko(); 40 48 } 41 49 … … 43 51 { 44 52 ClearAll(); 53 54 if (kenttänumero == 5) 55 { 56 VoittoRuutu(); 57 return; 58 } 59 45 60 Gravity = new Vector(0, -1000); 46 61 LuoPistelaskuri(); … … 55 70 Camera.ZoomFactor = 4.0; 56 71 //Camera.StayInLevel = true; 72 } 73 74 void VoittoRuutu() 75 { 76 Label Teksti = new Label("VICTORY"); 77 Add(Teksti); 78 Teksti.Font = Fontti; 79 Level.Background.Image = taustaKuva2; 80 Teksti.TextColor = Color.Ultramarine; 81 Teksti.TextScale = new Vector(4, 4); 82 Level.Background.Width = Screen.Height; 83 Level.Background.Height = Screen.Height; 84 //Level.Background.FitToLevel(); 85 86 Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 57 87 } 58 88 … … 127 157 { 128 158 Keyboard.Listen(Key.F1, ButtonState.Pressed, ShowControlHelp, "Näytä ohjeet"); 129 Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli");159 Keyboard.Listen(Key.Escape, ButtonState.Pressed, LisaaLopetusvalikko, "Lopeta peli"); 130 160 131 161 Keyboard.Listen(Key.Left, ButtonState.Down, Liikuta, "Liikkuu vasemmalle", pelaaja1, -nopeus); … … 158 188 { 159 189 maaliAani.Play(); 160 MessageDisplay.Add(" Hey fattie! You collected cheeseburger!!!!!!!! Nice job!!");190 MessageDisplay.Add("You collected cheeseburher! Nice Job!"); 161 191 tahti.Destroy(); 162 192 pisteLaskuri.Value += 1; … … 252 282 Windows.Weapon = new AssaultRifle(30, 10); 253 283 Windows.Weapon.InfiniteAmmo = true; 254 Windows.Weapon.FireRate = 0. 2;284 Windows.Weapon.FireRate = 0.1; 255 285 Windows.Weapon.ProjectileCollision = AmmusOsui; 256 286 … … 389 419 }; 390 420 } 391 392 421 void LisaaAlkuvalikko() 422 { 423 ClearAll(); 424 MultiSelectWindow alkuValikko = new MultiSelectWindow("Apple Rush", "Start Game", "Help", "Exit"); 425 Add(alkuValikko); 426 alkuValikko.AddItemHandler(0, Aloitapeli); 427 alkuValikko.AddItemHandler(1, Help); 428 alkuValikko.AddItemHandler(2, Exit); 429 } 430 431 void LisaaLopetusvalikko() 432 { 433 MultiSelectWindow LopetusValikko = new MultiSelectWindow("Restart?", "Yes", "No"); 434 Add(LopetusValikko); 435 LopetusValikko.AddItemHandler(0, LisaaAlkuvalikko); 436 } 437 void Help() 438 { 439 Label Teksti = new Label("Player1 Moves with arrow keys and Player2 with A,W and D \n\nCollect every cheeseburger on the map to move foward on maps! \n\nIf you touch an Android you will die\n\nHave fun!"); 440 Add(Teksti); 441 Add(Teksti); 442 Teksti.Font = Fontti; 443 Teksti.TextColor = Color.Aquamarine; 444 Teksti.TextScale = new Vector(1, 1); 445 Level.Background.Color = Color.Black; 446 //Label Aputeksti 447 Keyboard.Listen(Key.Escape, ButtonState.Pressed, LisaaAlkuvalikko, null); 448 } 393 449 } -
2015/30/EmilL/KariO/KariO/KariO/KariO.csproj.Debug.cachefile
r6989 r7027 8 8 Content\KenttÀ1.xnb 9 9 Content\KenttÀ2.xnb 10 Content\Kivi.xnb11 10 Content\Taustakuva.xnb 12 11 Content\KenttÀ3.xnb … … 17 16 Content\RÀjÀhdys.xnb 18 17 Content\Explosion31.xnb 18 Content\Taustakuva2.xnb 19 Content\SpriteFont1.xnb 20 Content\Kivi.xnb 19 21 Content\tausta biisi.wma -
2015/30/EmilL/KariO/KariO/KariO/Ohjelma.cs
r6875 r7027 6 6 static void Main(string[] args) 7 7 { 8 using ( KariO game = new KariO())8 using (AppleRush game = new AppleRush()) 9 9 { 10 10 #if !DEBUG -
2015/30/EmilL/KariO/KariO/KariO/obj/x86/Debug/KariO.csproj.FileListAbsolute.txt
r6989 r7027 26 26 C:\MyTemp\EmilL\KariO\KariO\KariO\bin\x86\Debug\Content\RÀjÀhdys.xnb 27 27 C:\MyTemp\EmilL\KariO\KariO\KariO\bin\x86\Debug\Content\Explosion31.xnb 28 C:\MyTemp\EmilL\KariO\KariO\KariO\bin\x86\Debug\Content\Taustakuva2.xnb 29 C:\MyTemp\EmilL\KariO\KariO\KariO\bin\x86\Debug\Content\SpriteFont1.xnb -
2015/30/EmilL/KariO/KariO/KariO/obj/x86/Debug/cachefile-{7A892C53-F6DC-4F86-A6EF-8724FB49CB87}-targetpath.txt
r6989 r7027 9 9 Content\KenttÀ1.xnb 10 10 Content\KenttÀ2.xnb 11 Content\Kivi.xnb12 11 Content\Taustakuva.xnb 13 12 Content\KenttÀ3.xnb … … 18 17 Content\RÀjÀhdys.xnb 19 18 Content\Explosion31.xnb 19 Content\Taustakuva2.xnb 20 Content\SpriteFont1.xnb 21 Content\Kivi.xnb -
2015/30/EmilL/KariO/KariO/KariOContent/KariOContent.contentproj
r6989 r7027 109 109 </ItemGroup> 110 110 <ItemGroup> 111 <Compile Include="Kivi.png">112 <Name>Kivi</Name>113 <Importer>TextureImporter</Importer>114 <Processor>TextureProcessor</Processor>115 </Compile>116 </ItemGroup>117 <ItemGroup>118 111 <Compile Include="Taustakuva.png"> 119 112 <Name>Taustakuva</Name> … … 171 164 </Compile> 172 165 </ItemGroup> 166 <ItemGroup> 167 <Compile Include="Taustakuva2.png"> 168 <Name>Taustakuva2</Name> 169 <Importer>TextureImporter</Importer> 170 <Processor>TextureProcessor</Processor> 171 </Compile> 172 </ItemGroup> 173 <ItemGroup> 174 <Compile Include="SpriteFont1.spritefont"> 175 <Name>SpriteFont1</Name> 176 <Importer>FontDescriptionImporter</Importer> 177 <Processor>FontDescriptionProcessor</Processor> 178 </Compile> 179 </ItemGroup> 180 <ItemGroup> 181 <Compile Include="Kivi.jpg"> 182 <Name>Kivi</Name> 183 <Importer>TextureImporter</Importer> 184 <Processor>TextureProcessor</Processor> 185 </Compile> 186 </ItemGroup> 173 187 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 174 188 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
2015/30/EmilL/KariO/KariO/KariOContent/obj/x86/Debug/ContentPipeline.xml
r6989 r7027 73 73 <Options>None</Options> 74 74 <Output>C:\MyTemp\EmilL\KariO\KariO\KariO\bin\x86\Debug\Content\Kenttä1.xnb</Output> 75 <Time>2015-07-2 3T10:16:12.0443448+03:00</Time>75 <Time>2015-07-24T12:09:23.9248645+03:00</Time> 76 76 </Item> 77 77 <Item> … … 82 82 <Options>None</Options> 83 83 <Output>C:\MyTemp\EmilL\KariO\KariO\KariO\bin\x86\Debug\Content\Kenttä2.xnb</Output> 84 <Time>2015-07-23T10:32:46.0765448+03:00</Time> 85 </Item> 86 <Item> 87 <Source>Kivi.png</Source> 88 <Name>Kivi</Name> 89 <Importer>TextureImporter</Importer> 90 <Processor>TextureProcessor</Processor> 91 <Options>None</Options> 92 <Output>C:\MyTemp\EmilL\KariO\KariO\KariO\bin\x86\Debug\Content\Kivi.xnb</Output> 93 <Time>2015-07-22T13:35:39.2305738+03:00</Time> 84 <Time>2015-07-24T12:10:43.4470645+03:00</Time> 94 85 </Item> 95 86 <Item> … … 109 100 <Options>None</Options> 110 101 <Output>C:\MyTemp\EmilL\KariO\KariO\KariO\bin\x86\Debug\Content\Kenttä3.xnb</Output> 111 <Time>2015-07-2 3T12:31:51.7570794+03:00</Time>102 <Time>2015-07-24T12:11:27.5112645+03:00</Time> 112 103 </Item> 113 104 <Item> … … 136 127 <Options>None</Options> 137 128 <Output>C:\MyTemp\EmilL\KariO\KariO\KariO\bin\x86\Debug\Content\Kenttä4.xnb</Output> 138 <Time>2015-07-2 3T14:06:53.9881882+03:00</Time>129 <Time>2015-07-24T12:12:25.8388645+03:00</Time> 139 130 </Item> 140 131 <Item> … … 164 155 <Output>C:\MyTemp\EmilL\KariO\KariO\KariO\bin\x86\Debug\Content\Explosion31.xnb</Output> 165 156 <Time>2015-07-23T14:53:18.3855882+03:00</Time> 157 </Item> 158 <Item> 159 <Source>Taustakuva2.png</Source> 160 <Name>Taustakuva2</Name> 161 <Importer>TextureImporter</Importer> 162 <Processor>TextureProcessor</Processor> 163 <Options>None</Options> 164 <Output>C:\MyTemp\EmilL\KariO\KariO\KariO\bin\x86\Debug\Content\Taustakuva2.xnb</Output> 165 <Time>2015-07-24T10:41:05.8408902+03:00</Time> 166 </Item> 167 <Item> 168 <Source>SpriteFont1.spritefont</Source> 169 <Name>SpriteFont1</Name> 170 <Importer>FontDescriptionImporter</Importer> 171 <Processor>FontDescriptionProcessor</Processor> 172 <Options>None</Options> 173 <Output>C:\MyTemp\EmilL\KariO\KariO\KariO\bin\x86\Debug\Content\SpriteFont1.xnb</Output> 174 <Time>2015-07-24T10:24:07.1452902+03:00</Time> 175 </Item> 176 <Item> 177 <Source>Kivi.jpg</Source> 178 <Name>Kivi</Name> 179 <Importer>TextureImporter</Importer> 180 <Processor>TextureProcessor</Processor> 181 <Options>None</Options> 182 <Output>C:\MyTemp\EmilL\KariO\KariO\KariO\bin\x86\Debug\Content\Kivi.xnb</Output> 183 <Time>2015-07-24T11:24:00.9121645+03:00</Time> 166 184 </Item> 167 185 <BuildSuccessful>true</BuildSuccessful>
Note: See TracChangeset
for help on using the changeset viewer.