Changeset 6778
- Timestamp:
- 2015-07-03 11:25:36 (8 years ago)
- Location:
- 2015/27/JaakkoS/Tikku
- Files:
-
- 17 added
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
2015/27/JaakkoS/Tikku/Tikku/Tikku/Tikku.cs
r6765 r6778 28 28 29 29 Image pelaajanKuva = LoadImage("Pelaaja"); 30 Image tahtiKuva = LoadImage(" tahti");30 Image tahtiKuva = LoadImage("aarre"); 31 31 Image vihuKuva = LoadImage("AUTO"); 32 32 Image kynaKuva = LoadImage("kyna"); 33 33 Image MaaKuva = LoadImage("Maa"); 34 34 Image palikkaKuva = LoadImage("palikka"); 35 Image Loppukuva = LoadImage("Loppu"); 35 36 36 37 SoundEffect maaliAani = LoadSoundEffect("maali"); 38 SoundEffect kynaAani = LoadSoundEffect("Health"); 39 SoundEffect auts = LoadSoundEffect("Auts"); 40 SoundEffect kuoleAani = LoadSoundEffect("Kuole"); 41 37 42 bool onmenettanytenergiaa = false; 38 43 … … 191 196 Keyboard.Listen(Key.F1, ButtonState.Pressed, ShowControlHelp, "Näytä ohjeet"); 192 197 Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 193 194 198 195 199 200 196 201 if (pelaajia == 2) 197 202 { 198 203 Keyboard.Listen(Key.Right, ButtonState.Down, Liikuta, "Liikkuu oikalle", pelaaja1, nopeus); 199 Keyboard.Listen(Key.A, ButtonState.Down, Liikuta, "Liikkuu vasemmalle", pelaaja1, nopeus);204 Keyboard.Listen(Key.A, ButtonState.Down, Liikuta, "Liikkuu vasemmalle", pelaaja1, -nopeus); 200 205 Keyboard.Listen(Key.Space, ButtonState.Pressed, Hyppaa, "Pelaaja hyppää", pelaaja1, hyppyNopeus); 201 206 … … 211 216 { 212 217 Keyboard.Listen(Key.D, ButtonState.Down, Liikuta, "Liikkuu oikalle", pelaaja1, nopeus); 213 Keyboard.Listen(Key.A, ButtonState.Down, Liikuta, "Liikkuu vasemmalle", pelaaja1, nopeus);218 Keyboard.Listen(Key.A, ButtonState.Down, Liikuta, "Liikkuu vasemmalle", pelaaja1, -nopeus); 214 219 Keyboard.Listen(Key.Space, ButtonState.Pressed, Hyppaa, "Pelaaja hyppää", pelaaja1, hyppyNopeus); 215 220 … … 251 256 elamalaskuri.Value++; 252 257 LisaaYksiUusiSydan(); 258 kynaAani.Play(); 253 259 } 254 260 } … … 266 272 void Kuole(PhysicsObject hahmo, PhysicsObject vihu) 267 273 { 274 268 275 if (onmenettanytenergiaa == false) 269 276 { 270 277 if (elamalaskuri.Value >= 0 || pelaajansydammet[elamalaskuri.Value] != null) 271 278 { 279 272 280 elamalaskuri.Value--; 273 281 onmenettanytenergiaa = true; 274 282 Timer.SingleShot(0.1, delegate { onmenettanytenergiaa = false; }); 275 283 pelaajansydammet[elamalaskuri.Value].Destroy(); 284 auts.Play(); 276 285 } 277 286 if (elamalaskuri.Value < 1) … … 281 290 Timer.SingleShot(3.0, SeuraavaKentta); 282 291 pelaajansydammet.Clear(); 292 kuoleAani.Play(); 283 293 } 284 294 } 295 285 296 286 297 } … … 323 334 324 335 if (kenttaNro == 1) LuoKentta("kentta1"); 336 if (kenttaNro == 1) MessageDisplay.Add("Lähdet etsimään tarun hohtoista aarretta... No mene jo!"); 325 337 else if (kenttaNro == 2) LuoKentta("kentta2"); 338 if (kenttaNro == 2) MessageDisplay.Add("Huhuh. Oliko rankkaa :D? AI EIKÖ VAI..."); 326 339 else if (kenttaNro == 3) LuoKentta("kentta3"); 327 else if (kenttaNro == 4) MessageDisplay.Add("Voitit pelin"); 328 if (kenttaNro == 4) Timer.SingleShot(3.0, Exit); 340 else if (kenttaNro == 4) LuoKentta("kentta4"); 341 if (kenttaNro == 4) MessageDisplay.Add("NO OLIKO NYT RANKKAA?!"); 342 else if (kenttaNro == 5) MessageDisplay.Add("Noh löysit aarteen. Onko nyt hyvä mieli? -_-*"); 343 if (kenttaNro == 5) Timer.SingleShot(3.0, Exit); 329 344 330 345 -
2015/27/JaakkoS/Tikku/Tikku/Tikku/Tikku.csproj.Debug.cachefile
r6765 r6778 5 5 Content\AUTO.xnb 6 6 Content\kyna.xnb 7 Content\palikka.xnb 8 Content\Maa.xnb 7 9 Content\kentta1.xnb 8 10 Content\kentta2.xnb 9 11 Content\kentta3.xnb 10 Content\palikka.xnb 11 Content\Maa.xnb 12 Content\Health.xnb 13 Content\Auts.xnb 14 Content\Kuole.xnb 15 Content\Loppu.xnb 16 Content\kentta4.xnb 12 17 Content\kentta2.txt -
2015/27/JaakkoS/Tikku/Tikku/Tikku/obj/x86/Debug/ContentPipeline-{70F78017-3504-40A5-864B-07486E7AEB1B}.xml
r6682 r6778 9 9 <Options>None</Options> 10 10 <Output>C:\MyTemp\JaakkoS\Tikku\Tikku\Tikku\bin\x86\Debug\Content\maali.xnb</Output> 11 <Time>2015-0 6-30T10:53:55.6624362+03:00</Time>11 <Time>2015-07-03T09:20:58.7322002+03:00</Time> 12 12 </Item> 13 13 <Item> … … 18 18 <Options>None</Options> 19 19 <Output>C:\MyTemp\JaakkoS\Tikku\Tikku\Tikku\bin\x86\Debug\Content\norsu.xnb</Output> 20 <Time>2015-0 6-30T10:53:55.6634362+03:00</Time>20 <Time>2015-07-03T09:20:58.8102007+03:00</Time> 21 21 </Item> 22 22 <Item> … … 27 27 <Options>None</Options> 28 28 <Output>C:\MyTemp\JaakkoS\Tikku\Tikku\Tikku\bin\x86\Debug\Content\tahti.xnb</Output> 29 <Time>2015-06-30T10:53:55.6654362+03:00</Time> 29 <Time>2015-07-03T09:20:58.8726011+03:00</Time> 30 </Item> 31 <Item> 32 <Source>Pelaaja.png</Source> 33 <Name>Pelaaja</Name> 34 <Importer>TextureImporter</Importer> 35 <Processor>TextureProcessor</Processor> 36 <Options>None</Options> 37 <Output>C:\MyTemp\JaakkoS\Tikku\Tikku\Tikku\bin\x86\Debug\Content\Pelaaja.xnb</Output> 38 <Time>2015-07-03T09:55:24.4766557+03:00</Time> 39 </Item> 40 <Item> 41 <Source>AUTO.png</Source> 42 <Name>AUTO</Name> 43 <Importer>TextureImporter</Importer> 44 <Processor>TextureProcessor</Processor> 45 <Options>None</Options> 46 <Output>C:\MyTemp\JaakkoS\Tikku\Tikku\Tikku\bin\x86\Debug\Content\AUTO.xnb</Output> 47 <Time>2015-07-03T09:31:17.8096781+03:00</Time> 48 </Item> 49 <Item> 50 <Source>kyna.png</Source> 51 <Name>kyna</Name> 52 <Importer>TextureImporter</Importer> 53 <Processor>TextureProcessor</Processor> 54 <Options>None</Options> 55 <Output>C:\MyTemp\JaakkoS\Tikku\Tikku\Tikku\bin\x86\Debug\Content\kyna.xnb</Output> 56 <Time>2015-07-03T09:20:58.7478003+03:00</Time> 57 </Item> 58 <Item> 59 <Source>palikka.png</Source> 60 <Name>palikka</Name> 61 <Importer>TextureImporter</Importer> 62 <Processor>TextureProcessor</Processor> 63 <Options>None</Options> 64 <Output>C:\MyTemp\JaakkoS\Tikku\Tikku\Tikku\bin\x86\Debug\Content\palikka.xnb</Output> 65 <Time>2015-07-03T09:20:58.7322002+03:00</Time> 66 </Item> 67 <Item> 68 <Source>Maa.png</Source> 69 <Name>Maa</Name> 70 <Importer>TextureImporter</Importer> 71 <Processor>TextureProcessor</Processor> 72 <Options>None</Options> 73 <Output>C:\MyTemp\JaakkoS\Tikku\Tikku\Tikku\bin\x86\Debug\Content\Maa.xnb</Output> 74 <Time>2015-07-03T09:20:58.7478003+03:00</Time> 30 75 </Item> 31 76 <Item> … … 36 81 <Options>None</Options> 37 82 <Output>C:\MyTemp\JaakkoS\Tikku\Tikku\Tikku\bin\x86\Debug\Content\kentta1.xnb</Output> 38 <Time>2015-07-01T14:47:28.7754785+03:00</Time> 39 </Item> 40 <Item> 41 <Source>Pelaaja.png</Source> 42 <Name>Pelaaja</Name> 43 <Importer>TextureImporter</Importer> 44 <Processor>TextureProcessor</Processor> 45 <Options>None</Options> 46 <Output>C:\MyTemp\JaakkoS\Tikku\Tikku\Tikku\bin\x86\Debug\Content\Pelaaja.xnb</Output> 47 <Time>2015-06-30T11:23:49.3804362+03:00</Time> 83 <Time>2015-07-03T09:20:58.7478003+03:00</Time> 48 84 </Item> 49 85 <Item> … … 54 90 <Options>None</Options> 55 91 <Output>C:\MyTemp\JaakkoS\Tikku\Tikku\Tikku\bin\x86\Debug\Content\kentta2.xnb</Output> 56 <Time>2015-07-0 1T13:50:39.9144785+03:00</Time>92 <Time>2015-07-03T09:20:58.7634004+03:00</Time> 57 93 </Item> 58 94 <Item> 59 <Source>AUTO.png</Source> 60 <Name>AUTO</Name> 95 <Source>kentta3.txt</Source> 96 <Name>kentta3</Name> 97 <Importer>TextFileImporter</Importer> 98 <Processor>TextFileContentProcessor</Processor> 99 <Options>None</Options> 100 <Output>C:\MyTemp\JaakkoS\Tikku\Tikku\Tikku\bin\x86\Debug\Content\kentta3.xnb</Output> 101 <Time>2015-07-03T09:35:24.7838691+03:00</Time> 102 </Item> 103 <Item> 104 <Source>Health.wav</Source> 105 <Name>Health</Name> 106 <Importer>WavImporter</Importer> 107 <Processor>SoundEffectProcessor</Processor> 108 <Options>None</Options> 109 <Output>C:\MyTemp\JaakkoS\Tikku\Tikku\Tikku\bin\x86\Debug\Content\Health.xnb</Output> 110 <Time>2015-07-03T09:38:39.6879494+03:00</Time> 111 </Item> 112 <Item> 113 <Source>Auts.wav</Source> 114 <Name>Auts</Name> 115 <Importer>WavImporter</Importer> 116 <Processor>SoundEffectProcessor</Processor> 117 <Options>None</Options> 118 <Output>C:\MyTemp\JaakkoS\Tikku\Tikku\Tikku\bin\x86\Debug\Content\Auts.xnb</Output> 119 <Time>2015-07-03T09:42:14.3021578+03:00</Time> 120 </Item> 121 <Item> 122 <Source>Kuole.wav</Source> 123 <Name>Kuole</Name> 124 <Importer>WavImporter</Importer> 125 <Processor>SoundEffectProcessor</Processor> 126 <Options>None</Options> 127 <Output>C:\MyTemp\JaakkoS\Tikku\Tikku\Tikku\bin\x86\Debug\Content\Kuole.xnb</Output> 128 <Time>2015-07-03T09:47:16.4837186+03:00</Time> 129 </Item> 130 <Item> 131 <Source>Loppu.png</Source> 132 <Name>Loppu</Name> 61 133 <Importer>TextureImporter</Importer> 62 134 <Processor>TextureProcessor</Processor> 63 135 <Options>None</Options> 64 <Output>C:\MyTemp\JaakkoS\Tikku\Tikku\Tikku\bin\x86\Debug\Content\ AUTO.xnb</Output>65 <Time>2015-07-0 1T10:43:14.7324785+03:00</Time>136 <Output>C:\MyTemp\JaakkoS\Tikku\Tikku\Tikku\bin\x86\Debug\Content\Loppu.xnb</Output> 137 <Time>2015-07-03T10:06:19.1784953+03:00</Time> 66 138 </Item> 67 139 <Item> 68 <Source>k yna.png</Source>69 <Name>k yna</Name>70 <Importer>Text ureImporter</Importer>71 <Processor>Text ureProcessor</Processor>140 <Source>kentta4.txt</Source> 141 <Name>kentta4</Name> 142 <Importer>TextFileImporter</Importer> 143 <Processor>TextFileContentProcessor</Processor> 72 144 <Options>None</Options> 73 <Output>C:\MyTemp\JaakkoS\Tikku\Tikku\Tikku\bin\x86\Debug\Content\k yna.xnb</Output>74 <Time>2015-07-0 1T12:27:08.9624785+03:00</Time>145 <Output>C:\MyTemp\JaakkoS\Tikku\Tikku\Tikku\bin\x86\Debug\Content\kentta4.xnb</Output> 146 <Time>2015-07-03T10:57:12.9161983+03:00</Time> 75 147 </Item> 76 148 <BuildSuccessful>true</BuildSuccessful> … … 121 193 <Assembly> 122 194 <Key>C:\Windows\Microsoft.Net\assembly\GAC_32\Microsoft.Xna.Framework.Content.Pipeline\v4.0_4.0.0.0__842cf8be1de50553\Microsoft.Xna.Framework.Content.Pipeline.dll</Key> 123 <Value>2014-0 4-23T01:01:53.8831999+03:00</Value>195 <Value>2014-05-02T09:58:16.3807377+03:00</Value> 124 196 </Assembly> 125 197 </Assemblies> -
2015/27/JaakkoS/Tikku/Tikku/Tikku/obj/x86/Debug/Tikku.csproj.FileListAbsolute.txt
r6765 r6778 19 19 C:\MyTemp\JaakkoS\Tikku\Tikku\Tikku\bin\x86\Debug\Content\palikka.xnb 20 20 C:\MyTemp\JaakkoS\Tikku\Tikku\Tikku\bin\x86\Debug\Content\Maa.xnb 21 C:\MyTemp\JaakkoS\Tikku\Tikku\Tikku\bin\x86\Debug\Content\Health.xnb 22 C:\MyTemp\JaakkoS\Tikku\Tikku\Tikku\bin\x86\Debug\Content\Auts.xnb 23 C:\MyTemp\JaakkoS\Tikku\Tikku\Tikku\bin\x86\Debug\Content\Kuole.xnb 24 C:\MyTemp\JaakkoS\Tikku\Tikku\Tikku\bin\x86\Debug\Content\Loppu.xnb 25 C:\MyTemp\JaakkoS\Tikku\Tikku\Tikku\bin\x86\Debug\Content\kentta4.xnb -
2015/27/JaakkoS/Tikku/Tikku/Tikku/obj/x86/Debug/cachefile-{70F78017-3504-40A5-864B-07486E7AEB1B}-targetpath.txt
r6765 r6778 5 5 Content\AUTO.xnb 6 6 Content\kyna.xnb 7 Content\palikka.xnb 8 Content\Maa.xnb 7 9 Content\kentta1.xnb 8 10 Content\kentta2.xnb 9 11 Content\kentta3.xnb 10 Content\palikka.xnb 11 Content\Maa.xnb 12 Content\Health.xnb 13 Content\Auts.xnb 14 Content\Kuole.xnb 15 Content\Loppu.xnb 16 Content\kentta4.xnb 12 17 Content\kentta2.txt -
2015/27/JaakkoS/Tikku/Tikku/TikkuContent/TikkuContent.contentproj
r6765 r6778 68 68 </ItemGroup> 69 69 <ItemGroup> 70 <Compile Include="Pelaaja.png">71 <Name>Pelaaja</Name>72 <Importer>TextureImporter</Importer>73 <Processor>TextureProcessor</Processor>74 </Compile>75 </ItemGroup>76 <ItemGroup>77 70 <Compile Include="kentta2.txt"> 78 71 <Name>kentta2</Name> … … 80 73 <Processor>TextFileContentProcessor</Processor> 81 74 <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 82 </Compile>83 </ItemGroup>84 <ItemGroup>85 <Compile Include="AUTO.png">86 <Name>AUTO</Name>87 <Importer>TextureImporter</Importer>88 <Processor>TextureProcessor</Processor>89 75 </Compile> 90 76 </ItemGroup> … … 117 103 </Compile> 118 104 </ItemGroup> 105 <ItemGroup> 106 <Compile Include="AUTO.png"> 107 <Name>AUTO</Name> 108 <Importer>TextureImporter</Importer> 109 <Processor>TextureProcessor</Processor> 110 </Compile> 111 </ItemGroup> 112 <ItemGroup> 113 <Compile Include="Health.wav"> 114 <Name>Health</Name> 115 <Importer>WavImporter</Importer> 116 <Processor>SoundEffectProcessor</Processor> 117 </Compile> 118 </ItemGroup> 119 <ItemGroup> 120 <Compile Include="Auts.wav"> 121 <Name>Auts</Name> 122 <Importer>WavImporter</Importer> 123 <Processor>SoundEffectProcessor</Processor> 124 </Compile> 125 </ItemGroup> 126 <ItemGroup> 127 <Compile Include="Kuole.wav"> 128 <Name>Kuole</Name> 129 <Importer>WavImporter</Importer> 130 <Processor>SoundEffectProcessor</Processor> 131 </Compile> 132 </ItemGroup> 133 <ItemGroup> 134 <Compile Include="Pelaaja.png"> 135 <Name>Pelaaja</Name> 136 <Importer>TextureImporter</Importer> 137 <Processor>TextureProcessor</Processor> 138 </Compile> 139 </ItemGroup> 140 <ItemGroup> 141 <Compile Include="Loppu.png"> 142 <Name>Loppu</Name> 143 <Importer>TextureImporter</Importer> 144 <Processor>TextureProcessor</Processor> 145 </Compile> 146 </ItemGroup> 147 <ItemGroup> 148 <Compile Include="kentta4.txt"> 149 <Name>kentta4</Name> 150 <Importer>TextFileImporter</Importer> 151 <Processor>TextFileContentProcessor</Processor> 152 </Compile> 153 </ItemGroup> 154 <ItemGroup> 155 <Compile Include="aarre.png"> 156 <Name>aarre</Name> 157 <Importer>TextureImporter</Importer> 158 <Processor>TextureProcessor</Processor> 159 </Compile> 160 </ItemGroup> 119 161 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 120 162 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
2015/27/JaakkoS/Tikku/Tikku/TikkuContent/kentta3.txt
r6765 r6778 2 2 ................................................................................ 3 3 ................................................................................ 4 ................................................................................5 *...............................................................................6 !!!!.................V...K...V..................................................7 ....................###..!..###............................................. ....8 .........V.................................................................. ....4 *...........................................................................!... 5 ............................................................................!... 6 .....................V...K...V..............................................!... 7 ....................###..!..###.............................................!... 8 .........V..................................................................!... 9 9 ........#####.......................K.................V................!!!!!#### 10 10 ......##########...................##.............K..###..K.................#..#
Note: See TracChangeset
for help on using the changeset viewer.