Changeset 9212 for 2017/utsjoki/NilláN/Speargear
- Timestamp:
- 2017-07-28 12:16:40 (6 years ago)
- Location:
- 2017/utsjoki/NilláN/Speargear
- Files:
-
- 8 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
2017/utsjoki/NilláN/Speargear/Speargear/Speargear/Speargear.cs
r9173 r9212 27 27 Pelaaja pelaaja2; 28 28 29 SoundEffect osumanääni = LoadSoundEffect("robux"); 30 29 31 Vector nopeusYlos = new Vector(0, 10000); 30 32 Vector nopeusAlas = new Vector(0, -10000); … … 42 44 Image vasenKuva = LoadImage("peliukko"); 43 45 Image taustakuva = LoadImage("taso"); 44 45 bool vasen = false; 46 bool oikea = false; 47 48 bool vasen2 = false; 49 bool oikea2 = false; 46 Image hitsplat = LoadImage("hit"); 50 47 51 48 … … 89 86 pelaaja2 = LuoPelaaja(-370, -250); 90 87 91 AddCollisionHandler<Pelaaja, PhysicsObject>(pelaaja1, "keihäs2", osuuKeihääseen); 92 AddCollisionHandler<Pelaaja, PhysicsObject>(pelaaja2, "keihäs1", osuuKeihääseen); 88 AddCollisionHandler<Pelaaja, PhysicsObject>(pelaaja1, "heitto2", (a, b) => osuuKeihääseen(a, b, 1, LoadImage("hit"))); 89 AddCollisionHandler<Pelaaja, PhysicsObject>(pelaaja2, "heitto1", (a,b) => osuuKeihääseen(a, b, 1, LoadImage("hit"))); 90 91 AddCollisionHandler<Pelaaja, PhysicsObject>(pelaaja1, "keihäs2", (a, b) => osuuKeihääseen(a, b, 2, LoadImage("hit2"))); 92 AddCollisionHandler<Pelaaja, PhysicsObject>(pelaaja2, "keihäs1", (a, b) => osuuKeihääseen(a, b, 2, LoadImage("hit2"))); 93 93 94 94 vasenReuna = Level.CreateLeftBorder(); … … 100 100 Level.Background.FitToLevel(); 101 101 102 //MediaPlayer.Play(""); 103 102 104 } 103 105 … … 121 123 Keyboard.Listen(Key.M, ButtonState.Pressed, Lyönti, null, pelaaja1, "keihäs1"); 122 124 Keyboard.Listen(Key.Comma, ButtonState.Pressed, torjunta, null, pelaaja1); 123 Keyboard.Listen(Key.Period, ButtonState.Pressed, heitäKeihäs, null, pelaaja1, " keihäs1");125 Keyboard.Listen(Key.Period, ButtonState.Pressed, heitäKeihäs, null, pelaaja1, "heitto1"); 124 126 125 127 … … 131 133 Keyboard.Listen(Key.Y, ButtonState.Pressed, Lyönti, null, pelaaja2, "keihäs2"); 132 134 Keyboard.Listen(Key.U, ButtonState.Pressed, torjunta, null, pelaaja2); 133 Keyboard.Listen(Key.T, ButtonState.Pressed, heitäKeihäs, null, pelaaja2, " keihäs2");135 Keyboard.Listen(Key.T, ButtonState.Pressed, heitäKeihäs, null, pelaaja2, "heitto2"); 134 136 135 137 } … … 168 170 } 169 171 170 void osuuKeihääseen(Pelaaja puolustaja, PhysicsObject keihäs )172 void osuuKeihääseen(Pelaaja puolustaja, PhysicsObject keihäs, int vahinko, Image splatkuva) 171 173 { 172 174 Pelaaja hyökkääjä = (puolustaja == pelaaja1) ? pelaaja2 : pelaaja1; … … 179 181 else 180 182 { 181 puolustaja.ElamaLaskuri.Value -= 1; 183 GameObject hitsplat = new GameObject(30, 30); 184 hitsplat.Image = splatkuva; 185 puolustaja.Add(hitsplat); 186 hitsplat.LifetimeLeft = TimeSpan.FromSeconds(1); 187 osumanääni.Play(); 188 puolustaja.ElamaLaskuri.Value -= vahinko; 182 189 puolustaja.Hit((puolustaja.Position - keihäs.Position).Normalize() * 5000); 183 190 } 191 184 192 185 193 } -
2017/utsjoki/NilláN/Speargear/Speargear/Speargear/Speargear.csproj.Debug.cachefile
r9173 r9212 6 6 Content\oikea.xnb 7 7 Content\taso.xnb 8 Content\roblox_death_sound_effect-f49ELvryhao_fmt43.xnb 9 Content\robux.xnb 10 Content\hit.xnb 11 Content\hit2.xnb 12 Content\roblox_death_sound_effect-f49ELvryhao_fmt43.wma -
2017/utsjoki/NilláN/Speargear/Speargear/Speargear/obj/x86/Debug/ContentPipeline-{2D890E8B-0405-4957-9033-337AC1B0214F}.xml
r9173 r9212 65 65 <Time>2017-07-27T12:04:36.163918+03:00</Time> 66 66 </Item> 67 <Item> 68 <Source>roblox_death_sound_effect-f49ELvryhao_fmt43.mp3</Source> 69 <Name>roblox_death_sound_effect-f49ELvryhao_fmt43</Name> 70 <Importer>Mp3Importer</Importer> 71 <Processor>SongProcessor</Processor> 72 <Options>None</Options> 73 <Output>C:\MyTemp\Speargear\Speargear\Speargear\bin\x86\Debug\Content\roblox_death_sound_effect-f49ELvryhao_fmt43.xnb</Output> 74 <Extra>C:\MyTemp\Speargear\Speargear\Speargear\bin\x86\Debug\Content\roblox_death_sound_effect-f49ELvryhao_fmt43.wma</Extra> 75 <Time>2017-07-27T14:51:06.8052669+03:00</Time> 76 </Item> 77 <Item> 78 <Source>robux.wav</Source> 79 <Name>robux</Name> 80 <Importer>WavImporter</Importer> 81 <Processor>SoundEffectProcessor</Processor> 82 <Options>None</Options> 83 <Output>C:\MyTemp\Speargear\Speargear\Speargear\bin\x86\Debug\Content\robux.xnb</Output> 84 <Time>2017-07-28T09:30:47.6007886+03:00</Time> 85 </Item> 86 <Item> 87 <Source>hit.png</Source> 88 <Name>hit</Name> 89 <Importer>TextureImporter</Importer> 90 <Processor>TextureProcessor</Processor> 91 <Options>None</Options> 92 <Output>C:\MyTemp\Speargear\Speargear\Speargear\bin\x86\Debug\Content\hit.xnb</Output> 93 <Time>2017-07-28T09:42:52.5672004+03:00</Time> 94 </Item> 95 <Item> 96 <Source>hit2.png</Source> 97 <Name>hit2</Name> 98 <Importer>TextureImporter</Importer> 99 <Processor>TextureProcessor</Processor> 100 <Options>None</Options> 101 <Output>C:\MyTemp\Speargear\Speargear\Speargear\bin\x86\Debug\Content\hit2.xnb</Output> 102 <Time>2017-07-28T10:51:54.9326918+03:00</Time> 103 </Item> 67 104 <BuildSuccessful>true</BuildSuccessful> 68 105 <Settings> -
2017/utsjoki/NilláN/Speargear/Speargear/Speargear/obj/x86/Debug/Speargear.csproj.FileListAbsolute.txt
r9173 r9212 14 14 C:\MyTemp\Speargear\Speargear\Speargear\bin\x86\Debug\Content\oikea.xnb 15 15 C:\MyTemp\Speargear\Speargear\Speargear\bin\x86\Debug\Content\taso.xnb 16 C:\MyTemp\Speargear\Speargear\Speargear\bin\x86\Debug\Content\roblox_death_sound_effect-f49ELvryhao_fmt43.xnb 17 C:\MyTemp\Speargear\Speargear\Speargear\bin\x86\Debug\Content\robux.xnb 18 C:\MyTemp\Speargear\Speargear\Speargear\bin\x86\Debug\Content\roblox_death_sound_effect-f49ELvryhao_fmt43.wma 19 C:\MyTemp\Speargear\Speargear\Speargear\bin\x86\Debug\Content\hit.xnb 20 C:\MyTemp\Speargear\Speargear\Speargear\bin\x86\Debug\Content\hit2.xnb -
2017/utsjoki/NilláN/Speargear/Speargear/Speargear/obj/x86/Debug/cachefile-{2D890E8B-0405-4957-9033-337AC1B0214F}-targetpath.txt
r9173 r9212 6 6 Content\oikea.xnb 7 7 Content\taso.xnb 8 Content\roblox_death_sound_effect-f49ELvryhao_fmt43.xnb 9 Content\roblox_death_sound_effect-f49ELvryhao_fmt43.wma 10 Content\robux.xnb 11 Content\hit.xnb 12 Content\hit2.xnb -
2017/utsjoki/NilláN/Speargear/Speargear/SpeargearContent/SpeargearContent.contentproj
r9173 r9212 94 94 </Compile> 95 95 </ItemGroup> 96 <ItemGroup> 97 <Compile Include="roblox_death_sound_effect-f49ELvryhao_fmt43.mp3"> 98 <Name>roblox_death_sound_effect-f49ELvryhao_fmt43</Name> 99 <Importer>Mp3Importer</Importer> 100 <Processor>SongProcessor</Processor> 101 </Compile> 102 </ItemGroup> 103 <ItemGroup> 104 <Compile Include="robux.wav"> 105 <Name>robux</Name> 106 <Importer>WavImporter</Importer> 107 <Processor>SoundEffectProcessor</Processor> 108 </Compile> 109 </ItemGroup> 110 <ItemGroup> 111 <Compile Include="hit.png"> 112 <Name>hit</Name> 113 <Importer>TextureImporter</Importer> 114 <Processor>TextureProcessor</Processor> 115 </Compile> 116 </ItemGroup> 117 <ItemGroup> 118 <Compile Include="hit2.png"> 119 <Name>hit2</Name> 120 <Importer>TextureImporter</Importer> 121 <Processor>TextureProcessor</Processor> 122 </Compile> 123 </ItemGroup> 96 124 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 97 125 <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Note: See TracChangeset
for help on using the changeset viewer.