Changeset 3841 for 2012/09-22
- Timestamp:
- 2012-09-22 15:54:05 (8 years ago)
- Location:
- 2012/09-22/SanteriH/Kynari
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
2012/09-22/SanteriH/Kynari/Kynari/Kynari/Kynari.cs
r3832 r3841 4 4 using Jypeli.Widgets; 5 5 using Jypeli.Assets; 6 7 namespace Kynari 6 using Jypeli.Controls; 7 8 // Yksinkertainen tasohyppely. 9 public class Kynari : PhysicsGame 8 10 { 9 // Yksinkertainen tasohyppely. 10 class Kynari : PhysicsGame 11 { 12 #region Muuttujat 13 14 const double liikeVoima = 2000; 15 const double hyppyVoima = 2000; 16 17 PlatformCharacter pelaaja1; 18 PlatformCharacter pelaaja2; 19 DoubleMeter HitPoint1 = new DoubleMeter(100); 20 DoubleMeter HitPoint2 = new DoubleMeter(100); 21 22 Image kranaatinheittimenkuva = LoadImage("grenade"); 23 Image magnumkuva = LoadImage("magnum"); 24 Image norsu = LoadImage("norsu"); 25 26 BarGauge hpNaytto; 27 BarGauge hpNaytto2; 28 29 bool pelaaja1asevaihto = true; 30 bool pelaaja2asevaihto = true; 31 32 Meter<int> pelaajan1Pisteet; 33 Meter<int> pelaajan2Pisteet; 34 35 #endregion 36 37 #region Alustukset 38 protected override void Begin() 39 { 40 LisaaLaskurit(); 41 DrawPerimeter = false; // ei haluta piirtää kentän reunoja 42 43 // Asetetaan painovoima 44 Gravity = new Vector(0, -1000); 45 // Zoomataan lähemmäksi 46 Camera.ZoomFactor = 0.7; 47 aloitaUusiPeli(); 48 } 49 50 void aloitaUusiPeli() 51 { 52 MessageDisplay.Clear(); 53 // ladataan kenttä 54 seuraavaKentta(); 55 pelaaja1asevaihto = true; 56 pelaaja2asevaihto = true; 57 naytaTiedot(); 58 59 } 60 #endregion 61 62 63 #region KentanLataus 64 void seuraavaKentta() 65 { 66 ClearAll(); 67 lisaaNappaimet(); 68 Camera.Position = new Vector(0, 0); 69 } 70 71 Level luoKentta() 72 { 73 Level.Width = 4000; 74 Level.Height = 1000; 75 Level.CreateBorders(); 76 Level.Background.CreateGradient(Color.White, Color.Gray); 77 78 luoTasot(); 79 lisaaPelaajat(); 80 lisaaAsePelaajalle(); 81 lisaaKerattavaAse(); 82 lisaaHPNaytot(); 83 84 return Level; 85 } 86 87 void luoTasot() 88 { 89 PhysicsObject alusta = new PhysicsObject(Level.Width, 300); 90 alusta.Color = Color.Gray; 91 alusta.X = 0; 92 alusta.Y = Level.Bottom - alusta.Height / 2; 93 Add(alusta); 94 95 lisaaPieniTaso(-200, -350); 96 lisaaPieniTaso(0, -400); 97 lisaaPieniTaso(100, -300); 98 lisaaPieniTaso(400, -350); 99 lisaaPieniTaso(450, -200); 100 lisaaPieniTaso(-500, -400); 101 lisaaPieniTaso(-550, -200); 102 lisaaPieniTaso(-400, -300); 103 lisaaPieniTaso(-150, -150); 104 lisaaPieniTaso(-870, -350); 105 lisaaPieniTaso(-700, -400); 106 107 lisaaPieniTaso(600, -300); 108 lisaaPieniTaso(850, -300); 109 lisaaPieniTaso(750, -400); 110 lisaaPieniTaso(200, -200); 111 lisaaPieniTaso(-200, -150); 112 113 lisaaPystyTaso(600, -450); 114 lisaaPystyTaso(-600, -500); 115 lisaaPystyTaso(0, -450); 116 117 lisaaReuna(-900, 0); 118 lisaaReuna(900, 0); 119 } 120 121 void lisaaHPNaytot() 122 { 123 // luodaan elämänäyttö 124 hpNaytto = new BarGauge(30, 250); 125 hpNaytto.Angle = Angle.Degrees(90); 126 hpNaytto.BarColor = Color.LightGreen; 127 hpNaytto.Color = Color.Red; 128 hpNaytto.BindTo(HitPoint1); 129 hpNaytto.Position = new Vector(Screen.RightSafe - 1000, Screen.TopSafe - 170); 130 Add(hpNaytto); 131 132 hpNaytto2 = new BarGauge(30, 250); 133 hpNaytto2.Angle = Angle.Degrees(90); 134 hpNaytto2.BarColor = Color.LightGreen; 135 hpNaytto2.Color = Color.Red; 136 hpNaytto2.BindTo(HitPoint2); 137 hpNaytto2.Position = new Vector(Screen.RightSafe - 300, Screen.TopSafe - 170); 138 Add(hpNaytto2); 139 } 140 141 void LisaaLaskurit() 142 { 143 pelaajan1Pisteet = LuoPisteLaskuri(Screen.Left + 100.0, Screen.Top - 100.0); 144 pelaajan2Pisteet = LuoPisteLaskuri(Screen.Right - 100.0, Screen.Top - 100.0); 145 pelaajan1Pisteet.UpperLimit += (laskuri1_UpperLimit); 146 pelaajan2Pisteet.UpperLimit += (laskuri2_UpperLimit); 147 } 148 149 void NollaaLaskurit() 150 { 151 pelaajan1Pisteet.Reset(); 152 pelaajan2Pisteet.Reset(); 153 } 154 155 IntMeter LuoPisteLaskuri(double x, double y) 156 { 157 IntMeter laskuri = new IntMeter(0); 158 Label naytto = new Label(); 159 naytto.BindTo(laskuri); 160 naytto.X = x; 161 naytto.Y = y; 162 Add(naytto); 163 return laskuri; 164 } 165 166 void laskuri1_UpperLimit(int pisteet) 167 { 168 MessageDisplay.Clear(); 169 MessageDisplay.Add("Pelaaja 1 voittaa!"); 170 MessageDisplay.X = -100; 171 172 } 173 174 void laskuri2_UpperLimit(int pisteet) 175 { 176 MessageDisplay.Clear(); 177 MessageDisplay.Add("Pelaaja 2 voittaa!"); 178 MessageDisplay.X = -100; 179 180 } 181 182 void lisaaPieniTaso(double x, double y) 183 { 184 PhysicsObject taso = new PhysicsObject(100, 30); 185 taso.Color = Color.Gray; 186 taso.X = x; 187 taso.Y = y; 188 Add(taso); 189 } 190 191 void lisaaReuna(double x, double y) 192 { 193 PhysicsObject taso = new PhysicsObject(50, 1000); 194 taso.Color = Color.Gray; 195 taso.X = x; 196 taso.Y = y; 197 Add(taso); 198 } 199 200 void lisaaPystyTaso(double x, double y) 201 { 202 PhysicsObject taso = new PhysicsObject(30, 100); 203 taso.Color = Color.Gray; 204 taso.X = x; 205 taso.Y = y; 206 Add(taso); 207 } 208 209 void lisaaPelaajat() 210 { 211 pelaaja1 = new PlatformCharacter(40, 40, Shapes.Circle); 212 pelaaja1.Image = norsu; 213 pelaaja1.X = -700; 214 pelaaja1.Mass = 4; 215 pelaaja1.Y = Level.Bottom + 20; 216 217 pelaaja2 = new PlatformCharacter(40, 40, Shapes.Circle); 218 pelaaja2.Image = norsu; 219 pelaaja2.X = 700; 220 pelaaja2.Y = Level.Bottom + 20; 221 222 HitPoint1.MaxValue = 100; 223 HitPoint1.Value = 100; 224 HitPoint1.LowerLimit += new EventHandler(pelaaja1Kuoli); 225 226 HitPoint2.MaxValue = 100; 227 HitPoint2.Value = 100; 228 HitPoint2.LowerLimit += new EventHandler(pelaaja2Kuoli); 229 230 Add(pelaaja1); 231 Add(pelaaja2); 232 } 233 234 void pelaaja1Kuoli(double Hitpointarvo) 235 { 236 PlatformCharacter pelaaja = (PlatformCharacter)sender; 237 /* 238 pelaaja.UnequipWeapon(); 239 Weapon kuolinAse = pelaaja.Weapon; 240 kuolinAse.RemoveFromOwner(); 241 kuolinAse.Unequip(); 242 kuolinAse.Visible = true; 243 */ 244 pelaaja.Destroy(); 245 MessageDisplay.Clear(); 246 MessageDisplay.X = -100; 247 MessageDisplay.Add("Pelaaja 2 voitti erän!"); 248 pelaajan2Pisteet.Value += 1; 249 250 if (pelaajan2Pisteet.Value == pelaajan2Pisteet.MaxValue) 11 #region Muuttujat 12 13 const double liikeVoima = 2000; 14 const double hyppyVoima = 2000; 15 16 PlatformCharacter pelaaja1; 17 PlatformCharacter pelaaja2; 18 DoubleMeter HitPoint1 = new DoubleMeter(100); 19 DoubleMeter HitPoint2 = new DoubleMeter(100); 20 21 Image kranaatinheittimenkuva = LoadImage("grenade"); 22 Image magnumkuva = LoadImage("magnum"); 23 Image norsu = LoadImage("norsu"); 24 25 BarGauge hpNaytto; 26 BarGauge hpNaytto2; 27 28 bool pelaaja1asevaihto = true; 29 bool pelaaja2asevaihto = true; 30 31 Meter<int> pelaajan1Pisteet; 32 Meter<int> pelaajan2Pisteet; 33 34 #endregion 35 36 #region Alustukset 37 public override void Begin() 38 { 39 LisaaLaskurit(); 40 DrawPerimeter = false; // ei haluta piirtää kentän reunoja 41 42 // Asetetaan painovoima 43 Gravity = new Vector(0, -1000); 44 // Zoomataan lähemmäksi 45 Camera.ZoomFactor = 0.7; 46 aloitaUusiPeli(); 47 } 48 49 void aloitaUusiPeli() 50 { 51 MessageDisplay.Clear(); 52 // ladataan kenttä 53 seuraavaKentta(); 54 pelaaja1asevaihto = true; 55 pelaaja2asevaihto = true; 56 naytaTiedot(); 57 58 } 59 #endregion 60 61 62 #region KentanLataus 63 void seuraavaKentta() 64 { 65 ClearAll(); 66 lisaaNappaimet(); 67 Camera.Position = new Vector(0, 0); 68 } 69 70 Level luoKentta() 71 { 72 Level.Width = 4000; 73 Level.Height = 1000; 74 Level.CreateBorders(); 75 Level.Background.CreateGradient(Color.White, Color.Gray); 76 77 luoTasot(); 78 lisaaPelaajat(); 79 lisaaAsePelaajalle(); 80 lisaaKerattavaAse(); 81 lisaaHPNaytot(); 82 83 return Level; 84 } 85 86 void luoTasot() 87 { 88 PhysicsObject alusta = new PhysicsObject(Level.Width, 300); 89 alusta.Color = Color.Gray; 90 alusta.X = 0; 91 alusta.Y = Level.Bottom - alusta.Height / 2; 92 Add(alusta); 93 94 lisaaPieniTaso(-200, -350); 95 lisaaPieniTaso(0, -400); 96 lisaaPieniTaso(100, -300); 97 lisaaPieniTaso(400, -350); 98 lisaaPieniTaso(450, -200); 99 lisaaPieniTaso(-500, -400); 100 lisaaPieniTaso(-550, -200); 101 lisaaPieniTaso(-400, -300); 102 lisaaPieniTaso(-150, -150); 103 lisaaPieniTaso(-870, -350); 104 lisaaPieniTaso(-700, -400); 105 106 lisaaPieniTaso(600, -300); 107 lisaaPieniTaso(850, -300); 108 lisaaPieniTaso(750, -400); 109 lisaaPieniTaso(200, -200); 110 lisaaPieniTaso(-200, -150); 111 112 lisaaPystyTaso(600, -450); 113 lisaaPystyTaso(-600, -500); 114 lisaaPystyTaso(0, -450); 115 116 lisaaReuna(-900, 0); 117 lisaaReuna(900, 0); 118 } 119 120 void lisaaHPNaytot() 121 { 122 // luodaan elämänäyttö 123 hpNaytto = new BarGauge(30, 250); 124 hpNaytto.Angle = Angle.FromDegrees(90); 125 hpNaytto.BarColor = Color.LightGreen; 126 hpNaytto.Color = Color.Red; 127 hpNaytto.BindTo(HitPoint1); 128 hpNaytto.Position = new Vector(Screen.RightSafe - 1000, Screen.TopSafe - 170); 129 Add(hpNaytto); 130 131 hpNaytto2 = new BarGauge(30, 250); 132 hpNaytto2.Angle = Angle.FromDegrees(90); 133 hpNaytto2.BarColor = Color.LightGreen; 134 hpNaytto2.Color = Color.Red; 135 hpNaytto2.BindTo(HitPoint2); 136 hpNaytto2.Position = new Vector(Screen.RightSafe - 300, Screen.TopSafe - 170); 137 Add(hpNaytto2); 138 } 139 140 void LisaaLaskurit() 141 { 142 pelaajan1Pisteet = LuoPisteLaskuri(Screen.Left + 100.0, Screen.Top - 100.0); 143 pelaajan2Pisteet = LuoPisteLaskuri(Screen.Right - 100.0, Screen.Top - 100.0); 144 pelaajan1Pisteet.UpperLimit += (laskuri1_UpperLimit); 145 pelaajan2Pisteet.UpperLimit += (laskuri2_UpperLimit); 146 } 147 148 void NollaaLaskurit() 149 { 150 pelaajan1Pisteet.Reset(); 151 pelaajan2Pisteet.Reset(); 152 } 153 154 IntMeter LuoPisteLaskuri(double x, double y) 155 { 156 IntMeter laskuri = new IntMeter(0); 157 Label naytto = new Label(); 158 naytto.BindTo(laskuri); 159 naytto.X = x; 160 naytto.Y = y; 161 Add(naytto); 162 return laskuri; 163 } 164 165 void laskuri1_UpperLimit() 166 { 167 MessageDisplay.Clear(); 168 MessageDisplay.Add("Pelaaja 1 voittaa!"); 169 MessageDisplay.X = -100; 170 171 } 172 173 void laskuri2_UpperLimit() 174 { 175 MessageDisplay.Clear(); 176 MessageDisplay.Add("Pelaaja 2 voittaa!"); 177 MessageDisplay.X = -100; 178 179 } 180 181 void lisaaPieniTaso(double x, double y) 182 { 183 PhysicsObject taso = new PhysicsObject(100, 30); 184 taso.Color = Color.Gray; 185 taso.X = x; 186 taso.Y = y; 187 Add(taso); 188 } 189 190 void lisaaReuna(double x, double y) 191 { 192 PhysicsObject taso = new PhysicsObject(50, 1000); 193 taso.Color = Color.Gray; 194 taso.X = x; 195 taso.Y = y; 196 Add(taso); 197 } 198 199 void lisaaPystyTaso(double x, double y) 200 { 201 PhysicsObject taso = new PhysicsObject(30, 100); 202 taso.Color = Color.Gray; 203 taso.X = x; 204 taso.Y = y; 205 Add(taso); 206 } 207 208 void lisaaPelaajat() 209 { 210 pelaaja1 = new PlatformCharacter(40, 40, Shape.Circle); 211 pelaaja1.Image = norsu; 212 pelaaja1.X = -700; 213 pelaaja1.Mass = 4; 214 pelaaja1.Y = Level.Bottom + 20; 215 216 pelaaja2 = new PlatformCharacter(40, 40, Shape.Circle); 217 pelaaja2.Image = norsu; 218 pelaaja2.X = 700; 219 pelaaja2.Y = Level.Bottom + 20; 220 221 HitPoint1.MaxValue = 100; 222 HitPoint1.Value = 100; 223 HitPoint1.LowerLimit += pelaaja1Kuoli; 224 225 HitPoint2.MaxValue = 100; 226 HitPoint2.Value = 100; 227 HitPoint2.LowerLimit += pelaaja2Kuoli; 228 229 Add(pelaaja1); 230 Add(pelaaja2); 231 } 232 233 void pelaaja1Kuoli() 234 { 235 PlatformCharacter pelaaja = (PlatformCharacter)sender; 236 /* 237 pelaaja.UnequipWeapon(); 238 Weapon kuolinAse = pelaaja.Weapon; 239 kuolinAse.RemoveFromOwner(); 240 kuolinAse.Unequip(); 241 kuolinAse.Visible = true; 242 */ 243 pelaaja.Destroy(); 244 MessageDisplay.Clear(); 245 MessageDisplay.X = -100; 246 MessageDisplay.Add("Pelaaja 2 voitti erän!"); 247 pelaajan2Pisteet.Value += 1; 248 249 if (pelaajan2Pisteet.Value == pelaajan2Pisteet.MaxValue) 250 { 251 return; 252 } 253 254 else 255 { 256 Timer ajastin2 = new Timer(); 257 ajastin2.Interval = 3; 258 ajastin2.Trigger += new Timer.TriggerHandler(eraloppui); 259 ajastin2.Start(); 260 AddTimer(ajastin2); 261 } 262 263 } 264 void pelaaja2Kuoli() 265 { 266 PlatformCharacter pelaaja = (PlatformCharacter)sender; 267 /* 268 pelaaja.UnequipWeapon(); 269 Weapon kuolinAse = pelaaja.Weapon; 270 kuolinAse.RemoveFromOwner(); 271 kuolinAse.Unequip(); 272 kuolinAse.Visible = true; 273 */ 274 pelaaja.Destroy(); 275 MessageDisplay.Clear(); 276 MessageDisplay.X = -100; 277 MessageDisplay.Add("Pelaaja 1 voitti erän!"); 278 pelaajan1Pisteet.Value += 1; 279 280 if (pelaajan2Pisteet.Value == pelaajan2Pisteet.MaxValue) 281 { 282 return; 283 } 284 285 else 286 { 287 Timer ajastin2 = new Timer(); 288 ajastin2.Interval = 3; 289 ajastin2.Trigger += new Timer.TriggerHandler(eraloppui); 290 ajastin2.Start(); 291 AddTimer(ajastin2); 292 } 293 } 294 295 void eraloppui(Timer sender) 296 { 297 aloitaUusiPeli(); 298 sender.Stop(); 299 RemoveTimer(sender); 300 } 301 302 void keraaAse(PhysicsObject pelaaja, PhysicsObject kohde) 303 { 304 if (kohde is PlatformCharacter) 305 { 306 if (kohde == pelaaja1) 307 { 308 if (pelaaja1asevaihto == false) 309 return; 310 311 pelaaja1asevaihto = false; 312 } 313 314 if (kohde == pelaaja2) 315 { 316 if (pelaaja2asevaihto == false) 317 return; 318 319 pelaaja2asevaihto = false; 320 } 321 322 Timer ajastin = new Timer(); 323 ajastin.Interval = 1; 324 ajastin.Tag = collision.Other; 325 ajastin.Trigger += new Timer.TriggerHandler(salliAseenvaihto); 326 ajastin.Start(); 327 AddTimer(ajastin); 328 329 // Pelaaja törmäsi aseeseen 330 ProjectileWeapon ase = (ProjectileWeapon)collision.Obj; 331 PlatformCharacter pelaaja = (PlatformCharacter)collision.Other; 332 if (ase.Owner != null) 251 333 { 252 334 return; 253 335 } 254 255 else256 {257 Timer ajastin2 = new Timer();258 ajastin2.Interval = 3;259 ajastin2.Trigger += new Timer.TriggerHandler(eraloppui);260 ajastin2.Start();261 AddTimer(ajastin2);262 }263 264 }265 void pelaaja2Kuoli(double Hitpointarvo)266 {267 PlatformCharacter pelaaja = (PlatformCharacter)sender;268 /*269 336 pelaaja.UnequipWeapon(); 270 Weapon kuolinAse = pelaaja.Weapon; 271 kuolinAse.RemoveFromOwner(); 272 kuolinAse.Unequip(); 273 kuolinAse.Visible = true; 274 */ 275 pelaaja.Destroy(); 276 MessageDisplay.Clear(); 277 MessageDisplay.X = -100; 278 MessageDisplay.Add("Pelaaja 1 voitti erän!"); 279 pelaajan1Pisteet.Value += 1; 280 281 if (pelaajan2Pisteet.Value == pelaajan2Pisteet.MaxValue) 282 { 283 return; 284 } 285 286 else 287 { 288 Timer ajastin2 = new Timer(); 289 ajastin2.Interval = 3; 290 ajastin2.Trigger += new Timer.TriggerHandler(eraloppui); 291 ajastin2.Start(); 292 AddTimer(ajastin2); 293 } 294 } 295 296 void eraloppui(Timer sender) 297 { 298 aloitaUusiPeli(); 299 sender.Stop(); 300 RemoveTimer(sender); 301 } 302 303 void keraaAse(PhysicsObject pelaaja, PhysicsObject kohde) 304 { 305 if (kohde is PlatformCharacter) 306 { 307 if (kohde == pelaaja1) 308 { 309 if (pelaaja1asevaihto == false) 310 return; 311 312 pelaaja1asevaihto = false; 313 } 314 315 if (kohde == pelaaja2) 316 { 317 if (pelaaja2asevaihto == false) 318 return; 319 320 pelaaja2asevaihto = false; 321 } 322 323 Timer ajastin = new Timer(); 324 ajastin.Interval = 1; 325 ajastin.Tag = collision.Other; 326 ajastin.Trigger += new Timer.TriggerHandler(salliAseenvaihto); 327 ajastin.Start(); 328 AddTimer(ajastin); 329 330 // Pelaaja törmäsi aseeseen 331 ProjectileWeapon ase = (ProjectileWeapon)collision.Obj; 332 PlatformCharacter pelaaja = (PlatformCharacter)collision.Other; 333 if (ase.Owner != null) 334 { 335 return; 336 } 337 pelaaja.UnequipWeapon(); 338 Weapon vanhaAse = pelaaja.Weapon; 339 vanhaAse.RemoveFromOwner(); 340 vanhaAse.X = pelaaja.X + vanhaAse.Width; 341 vanhaAse.Y = pelaaja.Y; 342 vanhaAse.Visible = true; 343 vanhaAse.Hit(new Vector(100, 20)); 344 pelaaja.Weapon = ase; 345 pelaaja.EquipWeapon(); 346 pelaaja.Weapon.Texture = ase.Texture; 347 naytaTiedot(); 348 } 349 } 350 351 352 353 void salliAseenvaihto(Timer sender) 354 { 355 if (sender.Tag == pelaaja1) 356 { 357 pelaaja1asevaihto = true; 358 } 359 else if (sender.Tag == pelaaja2) 360 { 361 pelaaja2asevaihto = true; 362 } 363 364 sender.Stop(); 365 RemoveTimer(sender); 366 } 367 368 void OnkoPelaaja(PhysicsObject olio) 369 { 370 return (olio == pelaaja1 || olio == pelaaja2); 371 } 372 373 void lisaaKerattavaAse() 374 { 375 //Täällä lisätään ase kenttään 376 Bullet luoti = new Bullet(); 377 Bullet luoti2 = new Bullet(); 378 Bullet hauli = new Bullet(); 379 380 Grenade kranaatti = new Grenade(); 381 kranaatti.Explosion = new Explosion(50, 200, 20, new Damage(10000)); 382 kranaatti.ExplodeCondition = OnkoPelaaja; 383 384 Texture2D shotgun = Content.Load<Texture2D>("shotgun"); 385 Texture2D grenade = Content.Load<Texture2D>("grenade"); 386 Texture2D magnumtexture = Content.Load<Texture2D>("magnum"); 387 388 AssaultRifle kivaari = new AssaultRifle(luoti); 389 kivaari.X = 200; 390 kivaari.Y = -100; 391 kivaari.FireRate = 5; 392 kivaari.MomentOfInertia = double.PositiveInfinity; 393 kivaari.Mass = 0.1; 394 kivaari.Tag = "Kivääri"; 395 Add(kivaari); 396 397 AssaultRifle magnum = new AssaultRifle(luoti2); 398 magnum.X = 0; 399 magnum.Y = -300; 400 magnum.FireRate = 1; 401 magnum.MomentOfInertia = double.PositiveInfinity; 402 magnum.Mass = 0.1; 403 magnum.Tag = "Magnum"; 404 magnum.Shape = Shapes.CreateFromTexture(magnumtexture, new Vector(magnumtexture.Width, magnumtexture.Height), 100); 405 magnum.Size = new Vector(magnumtexture.Width, magnumtexture.Height); 406 magnum.UpdateShapeFromSize(); 407 magnum.Texture = magnumtexture; 408 magnum.AmmoType.Damage = new Damage(20); 409 Add(magnum); 410 411 AssaultRifle haulikko = new AssaultRifle(hauli); 412 haulikko.X = -550; 413 haulikko.Y = 0; 414 haulikko.FireRate = 0.75; 415 haulikko.MomentOfInertia = double.PositiveInfinity; 416 haulikko.Mass = 0.1; 417 haulikko.Tag = "Haulikko"; 418 haulikko.AmmoType.Damage = new Damage(35); 419 haulikko.AmmoType.ClusterArc = 3; 420 haulikko.Texture = shotgun; 421 Add(haulikko); 422 423 Cannon kranaatinheitin = new Cannon(kranaatti); 424 kranaatinheitin.X = -200; 425 kranaatinheitin.Y = -100; 426 kranaatinheitin.FireRate = 0.2; 427 kranaatinheitin.MomentOfInertia = double.PositiveInfinity; 428 kranaatinheitin.Mass = 0.1; 429 kranaatinheitin.Power = new Meter<double>(5000, 0, 5000); 430 kranaatinheitin.Tag = "Kranaatinheitin"; 431 kranaatinheitin.Shape = Shapes.CreateFromTexture(grenade, new Vector(grenade.Width, grenade.Height), 100); 432 kranaatinheitin.Size = new Vector(grenade.Width, grenade.Height); 433 kranaatinheitin.UpdateShapeFromSize(); 434 kranaatinheitin.Texture = grenade; 435 Add(kranaatinheitin); 436 437 //Lisää myös törmäyksen käsittelijä aseelle, jossa kutsutaan keraaAse -aliohjelmaa 438 AddCollisionHandler(kivaari, keraaAse); 439 AddCollisionHandler(haulikko, keraaAse); 440 AddCollisionHandler(kranaatinheitin, keraaAse); 441 AddCollisionHandler(magnum, keraaAse); 442 } 443 444 void lisaaAsePelaajalle() 445 { 446 Bullet luoti = new Bullet(); 447 448 Texture2D pistol = Content.Load<Texture2D>("pistol"); 449 450 pelaaja1.UnequipWeapon(); 451 pelaaja1.Weapon = new AssaultRifle(luoti); 452 pelaaja1.Weapon.FireRate = 2; 453 pelaaja1.Weapon.Mass = 0.1; 454 Add(pelaaja1.Weapon); 455 pelaaja1.EquipWeapon(); 456 pelaaja1.Weapon.MomentOfInertia = double.PositiveInfinity; 457 pelaaja1.Weapon.Tag = "Pistooli"; 458 pelaaja1.Weapon.Shape = Shapes.CreateFromTexture(pistol, new Vector(pistol.Width, pistol.Height), 100); 459 pelaaja1.Weapon.Size = new Vector(pistol.Width, pistol.Height); 460 pelaaja1.Weapon.UpdateShapeFromSize(); 461 pelaaja1.Weapon.Texture = pistol; 462 AddCollisionHandler(pelaaja1.Weapon, keraaAse); 463 464 pelaaja2.UnequipWeapon(); 465 pelaaja2.Weapon = new AssaultRifle(luoti); 466 pelaaja2.Weapon.FireRate = 2; 467 pelaaja2.Weapon.Mass = 0.1; 468 Add(pelaaja2.Weapon); 469 pelaaja2.EquipWeapon(); 470 pelaaja2.Weapon.MomentOfInertia = double.PositiveInfinity; 471 pelaaja2.Weapon.Tag = "Pistooli"; 472 pelaaja2.Weapon.Shape = Shapes.CreateFromTexture(pistol, new Vector(pistol.Width, pistol.Height), 100); 473 pelaaja2.Weapon.Size = new Vector(pistol.Width, pistol.Height); 474 pelaaja2.Weapon.UpdateShapeFromSize(); 475 pelaaja2.Weapon.Texture = pistol; 476 AddCollisionHandler(pelaaja2.Weapon, keraaAse); 477 } 478 479 #endregion 480 481 482 #region Nappaimet 483 // Lisää peliin kaikki näppäimet 484 void lisaaNappaimet() 485 { 486 ClearControls(); 487 //Yleiset näppäimet 488 Keyboard.Listen(Keys.F1, ButtonState.Pressed, uusiPeli, "Aloittaa uuden pelin"); 489 490 // Pelaajan näppäimet 491 Keyboard.Listen(Key.A, ButtonState.Down, liikuta, "Liikkuu vasemmalle", pelaaja1, new Vector(-liikeVoima, 0)); 492 Keyboard.Listen(Key.D, ButtonState.Down, liikuta, "Liikkuu oikealle", pelaaja1, new Vector(liikeVoima, 0)); 493 Keyboard.Listen(Key.W, ButtonState.Pressed, hyppaa, "Hyppää", pelaaja1, hyppyVoima); 494 Keyboard.Listen(Key.Space, ButtonState.Down, Ammu, "Ammu", pelaaja1); 495 496 Keyboard.Listen(Key.Left, ButtonState.Down, liikuta, "Liikkuu vasemmalle", pelaaja2, new Vector(-liikeVoima, 0)); 497 Keyboard.Listen(Key.Right, ButtonState.Down, liikuta, "Liikkuu oikealle", pelaaja2, new Vector(liikeVoima, 0)); 498 Keyboard.Listen(Key.Up, ButtonState.Pressed, hyppaa, "Hyppää", pelaaja2, hyppyVoima); 499 Keyboard.Listen(Key.Enter, ButtonState.Down, Ammu, "Ammu", pelaaja2); 500 501 lisaaGamePadNappaimet(ControllerOne, pelaaja1); 502 lisaaGamePadNappaimet(ControllerTwo, pelaaja2); 503 } 504 505 void lisaaGamePadNappaimet(GamePad pelaajaNro, PlatformCharacter pelaaja) 506 { 507 //Yleiset näppäimet 508 pelaajaNro.Listen(pelaajaNro, Button.Start, ButtonState.Pressed, uusiPeli, "Aloittaa uuden pelin"); 509 510 pelaajaNro.Listen(pelaajaNro, Button.DPadLeft, ButtonState.Down, liikuta, "Pelaaja liikkuu vasemmalle", pelaaja, new Vector(-liikeVoima, 0)); 511 pelaajaNro.Listen(pelaajaNro, Button.DPadRight, ButtonState.Down, liikuta, "Pelaaja liikkuu oikealle", pelaaja, new Vector(liikeVoima, 0)); 512 pelaajaNro.Listen(pelaajaNro, Button.A, ButtonState.Pressed, hyppaa, "Pelaaja hyppää", pelaaja, hyppyVoima); 513 pelaajaNro.Listen(pelaajaNro, Button.RightTrigger, ButtonState.Down, Ammu, "Ammu", pelaaja); 514 } 515 516 // Näppäimiin liitetyt toiminnot alkavat tästä --> 517 void liikuta(PlatformCharacter hahmo, Vector voima) 518 { 519 hahmo.Walk(e.Time, voima); 520 } 521 522 void naytaTiedot() 523 { 524 MessageDisplay.Clear(); 525 MessageDisplay.X = -100; 526 MessageDisplay.Add("Pelaaja 1: " + pelaaja1.Weapon.Tag); 527 MessageDisplay.Add("Pelaaja 2: " + pelaaja2.Weapon.Tag); 337 Weapon vanhaAse = pelaaja.Weapon; 338 vanhaAse.RemoveFromOwner(); 339 vanhaAse.X = pelaaja.X + vanhaAse.Width; 340 vanhaAse.Y = pelaaja.Y; 341 vanhaAse.Visible = true; 342 vanhaAse.Hit(new Vector(100, 20)); 343 pelaaja.Weapon = ase; 344 pelaaja.EquipWeapon(); 345 pelaaja.Weapon.Texture = ase.Texture; 346 naytaTiedot(); 347 } 348 } 349 350 351 352 void salliAseenvaihto(Timer sender) 353 { 354 if (sender.Tag == pelaaja1) 355 { 356 pelaaja1asevaihto = true; 357 } 358 else if (sender.Tag == pelaaja2) 359 { 360 pelaaja2asevaihto = true; 361 } 362 363 sender.Stop(); 364 RemoveTimer(sender); 365 } 366 367 void OnkoPelaaja(PhysicsObject olio) 368 { 369 return (olio == pelaaja1 || olio == pelaaja2); 370 } 371 372 void lisaaKerattavaAse() 373 { 374 //Täällä lisätään ase kenttään 375 Bullet luoti = new Bullet(); 376 Bullet luoti2 = new Bullet(); 377 Bullet hauli = new Bullet(); 378 379 Grenade kranaatti = new Grenade(); 380 kranaatti.Explosion = new Explosion(50, 200, 20, new Damage(10000)); 381 kranaatti.ExplodeCondition = OnkoPelaaja; 382 383 Texture2D shotgun = Content.Load<Texture2D>("shotgun"); 384 Texture2D grenade = Content.Load<Texture2D>("grenade"); 385 Texture2D magnumtexture = Content.Load<Texture2D>("magnum"); 386 387 AssaultRifle kivaari = new AssaultRifle(luoti); 388 kivaari.X = 200; 389 kivaari.Y = -100; 390 kivaari.FireRate = 5; 391 kivaari.MomentOfInertia = double.PositiveInfinity; 392 kivaari.Mass = 0.1; 393 kivaari.Tag = "Kivääri"; 394 Add(kivaari); 395 396 AssaultRifle magnum = new AssaultRifle(luoti2); 397 magnum.X = 0; 398 magnum.Y = -300; 399 magnum.FireRate = 1; 400 magnum.MomentOfInertia = double.PositiveInfinity; 401 magnum.Mass = 0.1; 402 magnum.Tag = "Magnum"; 403 magnum.Shape = Shapes.CreateFromTexture(magnumtexture, new Vector(magnumtexture.Width, magnumtexture.Height), 100); 404 magnum.Size = new Vector(magnumtexture.Width, magnumtexture.Height); 405 magnum.UpdateShapeFromSize(); 406 magnum.Texture = magnumtexture; 407 magnum.AmmoType.Damage = new Damage(20); 408 Add(magnum); 409 410 AssaultRifle haulikko = new AssaultRifle(hauli); 411 haulikko.X = -550; 412 haulikko.Y = 0; 413 haulikko.FireRate = 0.75; 414 haulikko.MomentOfInertia = double.PositiveInfinity; 415 haulikko.Mass = 0.1; 416 haulikko.Tag = "Haulikko"; 417 haulikko.AmmoType.Damage = new Damage(35); 418 haulikko.AmmoType.ClusterArc = 3; 419 haulikko.Texture = shotgun; 420 Add(haulikko); 421 422 Cannon kranaatinheitin = new Cannon(kranaatti); 423 kranaatinheitin.X = -200; 424 kranaatinheitin.Y = -100; 425 kranaatinheitin.FireRate = 0.2; 426 kranaatinheitin.MomentOfInertia = double.PositiveInfinity; 427 kranaatinheitin.Mass = 0.1; 428 kranaatinheitin.Power = new Meter<double>(5000, 0, 5000); 429 kranaatinheitin.Tag = "Kranaatinheitin"; 430 kranaatinheitin.Shape = Shapes.CreateFromTexture(grenade, new Vector(grenade.Width, grenade.Height), 100); 431 kranaatinheitin.Size = new Vector(grenade.Width, grenade.Height); 432 kranaatinheitin.UpdateShapeFromSize(); 433 kranaatinheitin.Texture = grenade; 434 Add(kranaatinheitin); 435 436 //Lisää myös törmäyksen käsittelijä aseelle, jossa kutsutaan keraaAse -aliohjelmaa 437 AddCollisionHandler(kivaari, keraaAse); 438 AddCollisionHandler(haulikko, keraaAse); 439 AddCollisionHandler(kranaatinheitin, keraaAse); 440 AddCollisionHandler(magnum, keraaAse); 441 } 442 443 void lisaaAsePelaajalle() 444 { 445 Bullet luoti = new Bullet(); 446 447 Texture2D pistol = Content.Load<Texture2D>("pistol"); 448 449 pelaaja1.UnequipWeapon(); 450 pelaaja1.Weapon = new AssaultRifle(luoti); 451 pelaaja1.Weapon.FireRate = 2; 452 pelaaja1.Weapon.Mass = 0.1; 453 Add(pelaaja1.Weapon); 454 pelaaja1.EquipWeapon(); 455 pelaaja1.Weapon.MomentOfInertia = double.PositiveInfinity; 456 pelaaja1.Weapon.Tag = "Pistooli"; 457 pelaaja1.Weapon.Shape = Shapes.CreateFromTexture(pistol, new Vector(pistol.Width, pistol.Height), 100); 458 pelaaja1.Weapon.Size = new Vector(pistol.Width, pistol.Height); 459 pelaaja1.Weapon.UpdateShapeFromSize(); 460 pelaaja1.Weapon.Texture = pistol; 461 AddCollisionHandler(pelaaja1.Weapon, keraaAse); 462 463 pelaaja2.UnequipWeapon(); 464 pelaaja2.Weapon = new AssaultRifle(luoti); 465 pelaaja2.Weapon.FireRate = 2; 466 pelaaja2.Weapon.Mass = 0.1; 467 Add(pelaaja2.Weapon); 468 pelaaja2.EquipWeapon(); 469 // pelaaja2.Weapon.MomentOfInertia = double.PositiveInfinity; 470 pelaaja2.Weapon.Tag = "Pistooli"; 471 pelaaja2.Weapon.Shape = Shapes.CreateFromTexture(pistol, new Vector(pistol.Width, pistol.Height), 100); 472 pelaaja2.Weapon.Size = new Vector(pistol.Width, pistol.Height); 473 // pelaaja2.Weapon.UpdateShapeFromSize(); 474 pelaaja2.Weapon.Image = LoadImage("pistol"); 475 AddCollisionHandler(pelaaja2.Weapon, keraaAse); 476 } 477 478 #endregion 479 480 481 #region Nappaimet 482 // Lisää peliin kaikki näppäimet 483 void lisaaNappaimet() 484 { 485 ClearControls(); 486 //Yleiset näppäimet 487 Keyboard.Listen(Key.F1, ButtonState.Pressed, uusiPeli, "Aloittaa uuden pelin"); 488 489 // Pelaajan näppäimet 490 Keyboard.Listen(Key.A, ButtonState.Down, liikuta, "Liikkuu vasemmalle", pelaaja1, new Vector(-liikeVoima, 0)); 491 Keyboard.Listen(Key.D, ButtonState.Down, liikuta, "Liikkuu oikealle", pelaaja1, new Vector(liikeVoima, 0)); 492 Keyboard.Listen(Key.W, ButtonState.Pressed, hyppaa, "Hyppää", pelaaja1, hyppyVoima); 493 Keyboard.Listen(Key.Space, ButtonState.Down, Ammu, "Ammu", pelaaja1); 494 495 Keyboard.Listen(Key.Left, ButtonState.Down, liikuta, "Liikkuu vasemmalle", pelaaja2, new Vector(-liikeVoima, 0)); 496 Keyboard.Listen(Key.Right, ButtonState.Down, liikuta, "Liikkuu oikealle", pelaaja2, new Vector(liikeVoima, 0)); 497 Keyboard.Listen(Key.Up, ButtonState.Pressed, hyppaa, "Hyppää", pelaaja2, hyppyVoima); 498 Keyboard.Listen(Key.Enter, ButtonState.Down, Ammu, "Ammu", pelaaja2); 499 500 lisaaGamePadNappaimet(ControllerOne, pelaaja1); 501 lisaaGamePadNappaimet(ControllerTwo, pelaaja2); 502 } 503 504 void lisaaGamePadNappaimet(GamePad pelaajaNro, PlatformCharacter pelaaja) 505 { 506 //Yleiset näppäimet 507 //pelaajaNro.Listen(pelaajaNro, Button.Start, ButtonState.Pressed, uusiPeli, "Aloittaa uuden pelin"); 508 509 //pelaajaNro.Listen(pelaajaNro, Button.DPadLeft, ButtonState.Down, liikuta, "Pelaaja liikkuu vasemmalle", pelaaja, new Vector(-liikeVoima, 0)); 510 //pelaajaNro.Listen(pelaajaNro, Button.DPadRight, ButtonState.Down, liikuta, "Pelaaja liikkuu oikealle", pelaaja, new Vector(liikeVoima, 0)); 511 //pelaajaNro.Listen(pelaajaNro, Button.A, ButtonState.Pressed, hyppaa, "Pelaaja hyppää", pelaaja, hyppyVoima); 512 //pelaajaNro.Listen(pelaajaNro, Button.RightTrigger, ButtonState.Down, Ammu, "Ammu", pelaaja); 513 } 514 515 // Näppäimiin liitetyt toiminnot alkavat tästä --> 516 void liikuta(PlatformCharacter hahmo, Vector voima) 517 { 518 hahmo.Walk(e.Time, voima); 519 } 520 521 void naytaTiedot() 522 { 523 MessageDisplay.Clear(); 524 MessageDisplay.X = -100; 525 MessageDisplay.Add("Pelaaja 1: " + pelaaja1.Weapon.Tag); 526 MessageDisplay.Add("Pelaaja 2: " + pelaaja2.Weapon.Tag); 527 return false; 528 } 529 530 void Ammu(PlatformCharacter hahmo) 531 { 532 if (pelaaja.IsDestroyed()) 533 { 528 534 return false; 529 535 } 530 536 531 void Ammu(PlatformCharacter hahmo) 532 { 533 if (pelaaja.IsDestroyed()) 534 { 535 return false; 536 } 537 538 Projectile ammus = pelaaja.Weapon.Use(); 539 540 if (ammus != null) 541 { 542 Add(ammus); 543 } 544 537 Projectile ammus = pelaaja.Weapon.Use(); 538 539 if (ammus != null) 540 { 541 Add(ammus); 542 } 543 544 return false; 545 } 546 547 void hyppaa(PlatformCharacter hahmo, double voima) 548 { 549 //PlatformCharacter hahmo = e.Parameter0 as PlatformCharacter; 550 //double voima = e.Parameter1.ToDouble(); 551 552 if (Math.Abs(hahmo.Velocity.Y) > 0.001) 553 { 545 554 return false; 546 555 } 547 556 548 void hyppaa(PlatformCharacter hahmo, Vector voima) 549 { 550 //PlatformCharacter hahmo = e.Parameter0 as PlatformCharacter; 551 //double voima = e.Parameter1.ToDouble(); 552 553 if (Math.Abs(hahmo.Velocity.Y) > 0.001) 554 { 555 return false; 556 } 557 558 if (hahmo.Jump(voima)) 559 { 560 this.PlaySound("hyppays"); 561 } 562 return false; 563 } 564 565 void uusiPeli() 566 { 567 NollaaLaskurit(); 568 aloitaUusiPeli(); 569 return true; 570 } 571 #endregion 572 573 574 } 557 if (hahmo.Jump(voima)) 558 { 559 this.PlaySound("hyppays"); 560 } 561 return false; 562 } 563 564 void uusiPeli() 565 { 566 NollaaLaskurit(); 567 aloitaUusiPeli(); 568 return true; 569 } 570 #endregion 571 572 575 573 } -
2012/09-22/SanteriH/Kynari/Kynari/Kynari/Ohjelma.cs
r3832 r3841 1 1 using System; 2 using Jypeli; 2 3 3 4 static class Ohjelma -
2012/09-22/SanteriH/Kynari/Kynari/Kynari/obj/x86/Debug/ContentPipeline-{CE1DC0B1-C320-4A5D-86A8-6245AF0207D1}.xml
r3832 r3841 2 2 <XnaContent xmlns:Pipeline="Microsoft.Xna.Framework.Content.Pipeline"> 3 3 <Asset Type="Pipeline:BuildItemCollection"> 4 <Item> 5 <Source>pistol.png</Source> 6 <Name>pistol</Name> 7 <Importer>TextureImporter</Importer> 8 <Processor>TextureProcessor</Processor> 9 <Options>None</Options> 10 <Output>C:\MyTemp\SanteriH\Kynari\Kynari\Kynari\bin\x86\Debug\Content\pistol.xnb</Output> 11 <Time>2012-09-22T15:42:01.1111693+03:00</Time> 12 </Item> 13 <Item> 14 <Source>shotgun.png</Source> 15 <Name>shotgun</Name> 16 <Importer>TextureImporter</Importer> 17 <Processor>TextureProcessor</Processor> 18 <Options>None</Options> 19 <Output>C:\MyTemp\SanteriH\Kynari\Kynari\Kynari\bin\x86\Debug\Content\shotgun.xnb</Output> 20 <Time>2012-09-22T15:42:01.1111693+03:00</Time> 21 </Item> 22 <Item> 23 <Source>grenade.png</Source> 24 <Name>grenade</Name> 25 <Importer>TextureImporter</Importer> 26 <Processor>TextureProcessor</Processor> 27 <Options>None</Options> 28 <Output>C:\MyTemp\SanteriH\Kynari\Kynari\Kynari\bin\x86\Debug\Content\grenade.xnb</Output> 29 <Time>2012-09-22T15:42:08.6616177+03:00</Time> 30 </Item> 31 <Item> 32 <Source>magnum.png</Source> 33 <Name>magnum</Name> 34 <Importer>TextureImporter</Importer> 35 <Processor>TextureProcessor</Processor> 36 <Options>None</Options> 37 <Output>C:\MyTemp\SanteriH\Kynari\Kynari\Kynari\bin\x86\Debug\Content\magnum.xnb</Output> 38 <Time>2012-09-22T15:42:08.6616177+03:00</Time> 39 </Item> 40 <Item> 41 <Source>norsu.png</Source> 42 <Name>norsu</Name> 43 <Importer>TextureImporter</Importer> 44 <Processor>TextureProcessor</Processor> 45 <Options>None</Options> 46 <Output>C:\MyTemp\SanteriH\Kynari\Kynari\Kynari\bin\x86\Debug\Content\norsu.xnb</Output> 47 <Time>2012-09-22T15:42:08.6616177+03:00</Time> 48 </Item> 49 <Item> 50 <Source>tausta.mp3</Source> 51 <Name>tausta</Name> 52 <Importer>Mp3Importer</Importer> 53 <Processor>SongProcessor</Processor> 54 <Options>None</Options> 55 <Output>C:\MyTemp\SanteriH\Kynari\Kynari\Kynari\bin\x86\Debug\Content\tausta.xnb</Output> 56 <Extra>C:\MyTemp\SanteriH\Kynari\Kynari\Kynari\bin\x86\Debug\Content\tausta.wma</Extra> 57 <Time>2012-09-22T15:42:01.1111693+03:00</Time> 58 </Item> 59 <Item> 60 <Source>tormays.wav</Source> 61 <Name>tormays</Name> 62 <Importer>WavImporter</Importer> 63 <Processor>SoundEffectProcessor</Processor> 64 <Options>None</Options> 65 <Output>C:\MyTemp\SanteriH\Kynari\Kynari\Kynari\bin\x86\Debug\Content\tormays.xnb</Output> 66 <Time>2012-09-22T15:42:01.1111693+03:00</Time> 67 </Item> 68 <Item> 69 <Source>tuuppaus.wav</Source> 70 <Name>tuuppaus</Name> 71 <Importer>WavImporter</Importer> 72 <Processor>SoundEffectProcessor</Processor> 73 <Options>None</Options> 74 <Output>C:\MyTemp\SanteriH\Kynari\Kynari\Kynari\bin\x86\Debug\Content\tuuppaus.xnb</Output> 75 <Time>2012-09-22T15:42:01.1111693+03:00</Time> 76 </Item> 77 <Item> 78 <Source>hyppays.wav</Source> 79 <Name>hyppays</Name> 80 <Importer>WavImporter</Importer> 81 <Processor>SoundEffectProcessor</Processor> 82 <Options>None</Options> 83 <Output>C:\MyTemp\SanteriH\Kynari\Kynari\Kynari\bin\x86\Debug\Content\hyppays.xnb</Output> 84 <Time>2012-09-22T15:42:08.6616177+03:00</Time> 85 </Item> 86 <Item> 87 <Source>kerays.wav</Source> 88 <Name>kerays</Name> 89 <Importer>WavImporter</Importer> 90 <Processor>SoundEffectProcessor</Processor> 91 <Options>None</Options> 92 <Output>C:\MyTemp\SanteriH\Kynari\Kynari\Kynari\bin\x86\Debug\Content\kerays.xnb</Output> 93 <Time>2012-09-22T15:42:08.6616177+03:00</Time> 94 </Item> 95 <Item> 96 <Source>maali.wav</Source> 97 <Name>maali</Name> 98 <Importer>WavImporter</Importer> 99 <Processor>SoundEffectProcessor</Processor> 100 <Options>None</Options> 101 <Output>C:\MyTemp\SanteriH\Kynari\Kynari\Kynari\bin\x86\Debug\Content\maali.xnb</Output> 102 <Time>2012-09-22T15:42:08.6616177+03:00</Time> 103 </Item> 4 104 <BuildSuccessful>true</BuildSuccessful> 5 105 <Settings> … … 16 116 <Assemblies> 17 117 <Assembly> 118 <Key>C:\Program Files (x86)\Jypeli\lib\ContentExtensions\TextFileContentExtension.dll</Key> 119 <Value>2012-09-10T09:12:08+03:00</Value> 120 </Assembly> 121 <Assembly> 122 <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.XImporter.dll</Key> 123 <Value>2011-09-01T16:22:30+03:00</Value> 124 </Assembly> 125 <Assembly> 126 <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.VideoImporters.dll</Key> 127 <Value>2011-09-01T16:22:30+03:00</Value> 128 </Assembly> 129 <Assembly> 130 <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.TextureImporter.dll</Key> 131 <Value>2011-09-01T16:22:30+03:00</Value> 132 </Assembly> 133 <Assembly> 134 <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.FBXImporter.dll</Key> 135 <Value>2011-09-01T16:22:30+03:00</Value> 136 </Assembly> 137 <Assembly> 138 <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.EffectImporter.dll</Key> 139 <Value>2011-09-01T16:22:30+03:00</Value> 140 </Assembly> 141 <Assembly> 142 <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.AudioImporters.dll</Key> 143 <Value>2011-09-01T16:22:30+03:00</Value> 144 </Assembly> 145 <Assembly> 18 146 <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> 19 147 <Value>2012-07-09T09:25:48.6449529+03:00</Value> -
2012/09-22/SanteriH/Kynari/Kynari/KynariContent/KynariContent.contentproj
r3832 r3841 44 44 <Reference Include="TextFileContentExtension" /> 45 45 </ItemGroup> 46 <ItemGroup> 47 <Compile Include="pistol.png"> 48 <Name>pistol</Name> 49 <Importer>TextureImporter</Importer> 50 <Processor>TextureProcessor</Processor> 51 </Compile> 52 <Compile Include="shotgun.png"> 53 <Name>shotgun</Name> 54 <Importer>TextureImporter</Importer> 55 <Processor>TextureProcessor</Processor> 56 </Compile> 57 <Compile Include="tausta.mp3"> 58 <Name>tausta</Name> 59 <Importer>Mp3Importer</Importer> 60 <Processor>SongProcessor</Processor> 61 </Compile> 62 <Compile Include="tormays.wav"> 63 <Name>tormays</Name> 64 <Importer>WavImporter</Importer> 65 <Processor>SoundEffectProcessor</Processor> 66 </Compile> 67 <Compile Include="tuuppaus.wav"> 68 <Name>tuuppaus</Name> 69 <Importer>WavImporter</Importer> 70 <Processor>SoundEffectProcessor</Processor> 71 </Compile> 72 </ItemGroup> 73 <ItemGroup> 74 <Compile Include="grenade.png"> 75 <Name>grenade</Name> 76 <Importer>TextureImporter</Importer> 77 <Processor>TextureProcessor</Processor> 78 </Compile> 79 <Compile Include="hyppays.wav"> 80 <Name>hyppays</Name> 81 <Importer>WavImporter</Importer> 82 <Processor>SoundEffectProcessor</Processor> 83 </Compile> 84 <Compile Include="kerays.wav"> 85 <Name>kerays</Name> 86 <Importer>WavImporter</Importer> 87 <Processor>SoundEffectProcessor</Processor> 88 </Compile> 89 <Compile Include="maali.wav"> 90 <Name>maali</Name> 91 <Importer>WavImporter</Importer> 92 <Processor>SoundEffectProcessor</Processor> 93 </Compile> 94 <Compile Include="magnum.png"> 95 <Name>magnum</Name> 96 <Importer>TextureImporter</Importer> 97 <Processor>TextureProcessor</Processor> 98 </Compile> 99 <Compile Include="norsu.png"> 100 <Name>norsu</Name> 101 <Importer>TextureImporter</Importer> 102 <Processor>TextureProcessor</Processor> 103 </Compile> 104 </ItemGroup> 46 105 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 47 106 <!-- 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.