- Timestamp:
- 2016-07-01 11:30:06 (7 years ago)
- Location:
- 2016/26/VeetiK/CaveRun/CaveRun
- Files:
-
- 14 added
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
2016/26/VeetiK/CaveRun/CaveRun/CaveRun/CaveRun/CaveRun.cs
r7602 r7613 33 33 Image veri = LoadImage("nimetön"); 34 34 DoubleMeter pelaajanHP; 35 SoundEffect osuma = LoadSoundEffect("osuma"); 36 Image logo = LoadImage("Logo"); 37 SoundEffect ak = LoadSoundEffect("ak47"); 38 35 39 36 40 List<PhysicsObject> keys = new List<PhysicsObject>(); … … 38 42 public override void Begin() 39 43 { 44 MultiSelectWindow alkuValikko = new MultiSelectWindow("CaveRun","start", "exit"); 45 Add(alkuValikko); 46 alkuValikko.AddItemHandler(0, aloitapeli); 47 alkuValikko.AddItemHandler(1, Exit); 48 Mouse.IsCursorVisible = false; 49 Level.Background.Image = logo; 50 Level.Background.FitToLevel(); 51 Level.Background.Color = Color.DarkGray; 52 Camera.ZoomToLevel(); 53 IsFullScreen = true; 54 55 } 56 57 void aloitapeli() 58 { 59 ClearAll(); 40 60 IsFullScreen = true; 41 61 SmoothTextures = false; … … 46 66 MediaPlayer.Play("Taustamusiikki"); 47 67 MediaPlayer.IsRepeating = true; 68 69 70 48 71 } 49 72 void luokentta() … … 64 87 Level.Background.TileToLevel(); 65 88 Level.Background.Color = Color.Black; 89 90 66 91 67 92 … … 125 150 AddCollisionHandler(pelaaja, "zombi", delegate(PhysicsObject p, PhysicsObject kohde) { 126 151 pelaajanHP.Value -= 50.0; ControllerOne.Vibrate(0.5, 0.5, 0.0, 0.0, 0.5); 152 osuma.Play(); 127 153 }); 128 154 … … 180 206 181 207 ControllerOne.ListenAnalog(AnalogControl.LeftTrigger, 0.0, Juoksu, null); 182 ControllerOne.Listen(Button.Start,0.0, Pause, "Pysäyttää pelin"); 208 ControllerOne.Listen(Button.Start, ButtonState.Pressed, ConfirmExit, null); 209 183 210 184 211 … … 213 240 { 214 241 Kenttänumero += 1; 215 ClearAll(); 216 Begin(); 242 //ClearAll(); 243 //Begin(); 244 aloitapeli(); 217 245 } 218 246 … … 260 288 Ase.IgnoresCollisionResponse = true; 261 289 Add(Ase); 290 262 291 263 292 … … 281 310 { 282 311 pelaajanAse = new AssaultRifle(30, 10); 283 pelaajanAse.InfiniteAmmo = false;312 pelaajanAse.InfiniteAmmo = true; 284 313 pelaajanAse.ProjectileCollision = AmmusOsui; 285 pelaajanAse.Ammo.Value = 10;314 // pelaajanAse.Ammo.Value = 10; 286 315 pelaaja.Image=Pelaajakuva; 287 316 pelaaja.Add(pelaajanAse); 288 317 pelaajanAse.IsVisible = false; 289 ammuslaskuri = new IntMeter(0); 290 291 Label pisteNaytto = new Label(); 292 pisteNaytto.X = Screen.Left + 100; 293 pisteNaytto.Y = Screen.Top - 100; 294 pisteNaytto.TextColor = Color.Black; 295 pisteNaytto.Color = Color.White; 296 297 pisteNaytto.BindTo(pelaajanAse); 298 Add(pisteNaytto); 299 318 pelaajanAse.FireRate = 9.0; 319 pelaajanAse.AttackSound.(); 300 320 301 321 } … … 359 379 protected override void Update(Time time) 360 380 { 361 taskulamppu.Position = pelaaja.Position; 362 taskulamppu.Angle = pelaaja.Angle; 381 if (pelaaja != null) 382 { 383 taskulamppu.Position = pelaaja.Position; 384 taskulamppu.Angle = pelaaja.Angle; 385 } 363 386 base.Update(time); 364 387 } … … 379 402 //ammus.Size *= 3; 380 403 ammus.Image = luodinKuva; 404 381 405 ammus.Size = new Vector(25 / 2.0, 8 / 2.0); 382 406 AddCollisionHandler(ammus, delegate(PhysicsObject a, PhysicsObject kohde) … … 391 415 rajahdys.Image = veri; 392 416 pelaaja.IgnoresExplosions = true; 417 rajahdys.Sound = osuma; 393 418 Add(rajahdys); 419 394 420 } 395 421 }); -
2016/26/VeetiK/CaveRun/CaveRun/CaveRun/CaveRun/CaveRun.csproj.Debug.cachefile
r7602 r7613 16 16 Content\map2.xnb 17 17 Content\Nimetön.xnb 18 Content\osuma.xnb 19 Content\Map6.xnb 20 Content\Map4.xnb 21 Content\Map5.xnb 22 Content\Logo.xnb 23 Content\Map7.xnb 24 Content\ak47.xnb 18 25 Content\Taustamusiikki.wma -
2016/26/VeetiK/CaveRun/CaveRun/CaveRun/CaveRun/obj/x86/Debug/CaveRun.csproj.FileListAbsolute.txt
r7602 r7613 49 49 C:\MyTemp\VeetiK\CaveRun\CaveRun\CaveRun\CaveRun\bin\x86\Debug\Content\map2.xnb 50 50 C:\MyTemp\VeetiK\CaveRun\CaveRun\CaveRun\CaveRun\bin\x86\Debug\Content\Nimetön.xnb 51 C:\MyTemp\VeetiK\CaveRun\CaveRun\CaveRun\CaveRun\bin\x86\Debug\Content\osuma.xnb 52 C:\MyTemp\VeetiK\CaveRun\CaveRun\CaveRun\CaveRun\bin\x86\Debug\Content\Map6.xnb 53 C:\MyTemp\VeetiK\CaveRun\CaveRun\CaveRun\CaveRun\bin\x86\Debug\Content\Map4.xnb 54 C:\MyTemp\VeetiK\CaveRun\CaveRun\CaveRun\CaveRun\bin\x86\Debug\Content\Map5.xnb 55 C:\MyTemp\VeetiK\CaveRun\CaveRun\CaveRun\CaveRun\bin\x86\Debug\Content\Logo.xnb 56 C:\MyTemp\VeetiK\CaveRun\CaveRun\CaveRun\CaveRun\bin\x86\Debug\Content\Map7.xnb 57 C:\MyTemp\VeetiK\CaveRun\CaveRun\CaveRun\CaveRun\bin\x86\Debug\Content\ak47.xnb -
2016/26/VeetiK/CaveRun/CaveRun/CaveRun/CaveRun/obj/x86/Debug/ContentPipeline-{6A862D89-0D3E-4451-B01A-26F629755B8E}.xml
r7602 r7613 136 136 <Options>None</Options> 137 137 <Output>C:\MyTemp\VeetiK\CaveRun\CaveRun\CaveRun\CaveRun\bin\x86\Debug\Content\map3.xnb</Output> 138 <Time>2016-0 6-30T14:38:15.906904+03:00</Time>138 <Time>2016-07-01T11:10:17.3346536+03:00</Time> 139 139 </Item> 140 140 <Item> … … 145 145 <Options>None</Options> 146 146 <Output>C:\MyTemp\VeetiK\CaveRun\CaveRun\CaveRun\CaveRun\bin\x86\Debug\Content\map2.xnb</Output> 147 <Time>2016-0 6-30T14:38:15.938104+03:00</Time>147 <Time>2016-07-01T10:09:27.4554575+03:00</Time> 148 148 </Item> 149 149 <Item> … … 155 155 <Output>C:\MyTemp\VeetiK\CaveRun\CaveRun\CaveRun\CaveRun\bin\x86\Debug\Content\Nimetön.xnb</Output> 156 156 <Time>2016-06-30T13:32:36.011338+03:00</Time> 157 </Item> 158 <Item> 159 <Source>osuma.wav</Source> 160 <Name>osuma</Name> 161 <Importer>WavImporter</Importer> 162 <Processor>SoundEffectProcessor</Processor> 163 <Options>None</Options> 164 <Output>C:\MyTemp\VeetiK\CaveRun\CaveRun\CaveRun\CaveRun\bin\x86\Debug\Content\osuma.xnb</Output> 165 <Time>2016-07-01T09:31:09.6873852+03:00</Time> 166 </Item> 167 <Item> 168 <Source>Map6.png</Source> 169 <Name>Map6</Name> 170 <Importer>TextureImporter</Importer> 171 <Processor>TextureProcessor</Processor> 172 <Options>None</Options> 173 <Output>C:\MyTemp\VeetiK\CaveRun\CaveRun\CaveRun\CaveRun\bin\x86\Debug\Content\Map6.xnb</Output> 174 <Time>2016-07-01T09:59:17.5227575+03:00</Time> 175 </Item> 176 <Item> 177 <Source>Map4.png</Source> 178 <Name>Map4</Name> 179 <Importer>TextureImporter</Importer> 180 <Processor>TextureProcessor</Processor> 181 <Options>None</Options> 182 <Output>C:\MyTemp\VeetiK\CaveRun\CaveRun\CaveRun\CaveRun\bin\x86\Debug\Content\Map4.xnb</Output> 183 <Time>2016-07-01T09:53:38.3598156+03:00</Time> 184 </Item> 185 <Item> 186 <Source>Map5.png</Source> 187 <Name>Map5</Name> 188 <Importer>TextureImporter</Importer> 189 <Processor>TextureProcessor</Processor> 190 <Options>None</Options> 191 <Output>C:\MyTemp\VeetiK\CaveRun\CaveRun\CaveRun\CaveRun\bin\x86\Debug\Content\Map5.xnb</Output> 192 <Time>2016-07-01T09:59:49.4825575+03:00</Time> 193 </Item> 194 <Item> 195 <Source>Logo.png</Source> 196 <Name>Logo</Name> 197 <Importer>TextureImporter</Importer> 198 <Processor>TextureProcessor</Processor> 199 <Options>None</Options> 200 <Output>C:\MyTemp\VeetiK\CaveRun\CaveRun\CaveRun\CaveRun\bin\x86\Debug\Content\Logo.xnb</Output> 201 <Time>2016-07-01T10:28:51.3384247+03:00</Time> 202 </Item> 203 <Item> 204 <Source>Map7.png</Source> 205 <Name>Map7</Name> 206 <Importer>TextureImporter</Importer> 207 <Processor>TextureProcessor</Processor> 208 <Options>None</Options> 209 <Output>C:\MyTemp\VeetiK\CaveRun\CaveRun\CaveRun\CaveRun\bin\x86\Debug\Content\Map7.xnb</Output> 210 <Time>2016-07-01T10:59:32.166809+03:00</Time> 211 </Item> 212 <Item> 213 <Source>ak47.wav</Source> 214 <Name>ak47</Name> 215 <Importer>WavImporter</Importer> 216 <Processor>SoundEffectProcessor</Processor> 217 <Options>None</Options> 218 <Output>C:\MyTemp\VeetiK\CaveRun\CaveRun\CaveRun\CaveRun\bin\x86\Debug\Content\ak47.xnb</Output> 219 <Time>2016-07-01T11:18:01.2209653+03:00</Time> 157 220 </Item> 158 221 <BuildSuccessful>true</BuildSuccessful> -
2016/26/VeetiK/CaveRun/CaveRun/CaveRun/CaveRun/obj/x86/Debug/cachefile-{6A862D89-0D3E-4451-B01A-26F629755B8E}-targetpath.txt
r7602 r7613 17 17 Content\map2.xnb 18 18 Content\Nimetön.xnb 19 Content\osuma.xnb 20 Content\Map6.xnb 21 Content\Map4.xnb 22 Content\Map5.xnb 23 Content\Logo.xnb 24 Content\Map7.xnb 25 Content\ak47.xnb -
2016/26/VeetiK/CaveRun/CaveRun/CaveRun/CaveRunContent/CaveRunContent.contentproj
r7602 r7613 151 151 </ItemGroup> 152 152 <ItemGroup> 153 <Compile Include="Map6.png"> 154 <Name>Map6</Name> 155 <Importer>TextureImporter</Importer> 156 <Processor>TextureProcessor</Processor> 157 </Compile> 158 </ItemGroup> 159 <ItemGroup> 160 <Compile Include="Nimetön.png"> 161 <Name>Nimetön</Name> 162 <Importer>TextureImporter</Importer> 163 <Processor>TextureProcessor</Processor> 164 </Compile> 165 </ItemGroup> 166 <ItemGroup> 167 <Compile Include="osuma.wav"> 168 <Name>osuma</Name> 169 <Importer>WavImporter</Importer> 170 <Processor>SoundEffectProcessor</Processor> 171 </Compile> 172 </ItemGroup> 173 <ItemGroup> 153 174 <Compile Include="Map3.png"> 154 175 <Name>Map3</Name> … … 158 179 </ItemGroup> 159 180 <ItemGroup> 160 <Compile Include="Nimetön.png"> 161 <Name>Nimetön</Name> 162 <Importer>TextureImporter</Importer> 163 <Processor>TextureProcessor</Processor> 181 <Compile Include="Map4.png"> 182 <Name>Map4</Name> 183 <Importer>TextureImporter</Importer> 184 <Processor>TextureProcessor</Processor> 185 </Compile> 186 </ItemGroup> 187 <ItemGroup> 188 <Compile Include="Map5.png"> 189 <Name>Map5</Name> 190 <Importer>TextureImporter</Importer> 191 <Processor>TextureProcessor</Processor> 192 </Compile> 193 </ItemGroup> 194 <ItemGroup> 195 <Compile Include="Logo.png"> 196 <Name>Logo</Name> 197 <Importer>TextureImporter</Importer> 198 <Processor>TextureProcessor</Processor> 199 </Compile> 200 </ItemGroup> 201 <ItemGroup> 202 <Compile Include="Map7.png"> 203 <Name>Map7</Name> 204 <Importer>TextureImporter</Importer> 205 <Processor>TextureProcessor</Processor> 206 </Compile> 207 </ItemGroup> 208 <ItemGroup> 209 <Compile Include="ak47.wav"> 210 <Name>ak47</Name> 211 <Importer>WavImporter</Importer> 212 <Processor>SoundEffectProcessor</Processor> 164 213 </Compile> 165 214 </ItemGroup>
Note: See TracChangeset
for help on using the changeset viewer.