- Timestamp:
- 2012-06-28 14:21:22 (9 years ago)
- Location:
- 2012/26/JereL/Sekasorto/Sekasorto
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
2012/26/JereL/Sekasorto/Sekasorto/Sekasorto/Sekasorto.cs
r3312 r3317 190 190 ajastin2.Interval = 4; 191 191 ajastin2.Timeout += ToinenKentta; 192 MediaPlayer.Play("Yeah"); 192 193 ajastin2.Start(1); 193 194 … … 220 221 { 221 222 Timer aikaLaskuri = new Timer(); 222 aikaLaskuri.Interval = 30;223 aikaLaskuri.Interval = 1; 223 224 aikaLaskuri.Timeout += AikaLoppui; 224 225 aikaLaskuri.Start(1); … … 299 300 Tormays2(); 300 301 asetaOhjaimet2(); 301 TekoAly ();302 TekoAly2(); 302 303 TaustaMusiikki2(); 303 304 } … … 318 319 Kolmio2.Shape = Shape.Triangle; 319 320 Kolmio2.Color = Color.LightGreen; 320 Kolmio2.X = -300;321 Kolmio2.Y = -300;321 Kolmio2.X = 0; 322 Kolmio2.Y = 0; 322 323 Kolmio2.IgnoresGravity = true; 323 324 Add(Kolmio2); … … 327 328 Camera.ZoomToLevel(); 328 329 329 Timer ajastin = new Timer();330 ajastin.Interval = 1.5;331 ajastin.Timeout += PainovoimanVaihto;332 ajastin.Start();333 334 Gravity = new Vector(0, 200);335 336 for (int i = 0; i <= -1; i++)337 {338 LuoPikkuMolli2();339 }330 //Timer ajastin = new Timer(); 331 //ajastin.Interval = 1.5; 332 //ajastin.Timeout += PainovoimanVaihto; 333 //ajastin.Start(); 334 335 //Gravity = new Vector(0, 200); 336 337 //for (int i = 0; i <= -1; i++) 338 //{ 339 // LuoPikkuMolli2(); 340 //} 340 341 } 341 342 … … 345 346 } 346 347 347 void LuoPikkuMolli2() 348 { 349 PhysicsObject Molli = new PhysicsObject(30, 30); 350 //(RandomGen.NextDouble(5, 20), RandomGen.NextDouble(5, 20)); 351 Molli.Shape = Shape.Circle; 352 Molli.Color = Color.Yellow; 353 Molli.X = RandomGen.NextDouble(Level.Left + 10, Level.Right - 10); 354 Molli.Y = RandomGen.NextDouble(Level.Bottom + 10, Level.Top - 10); 355 Add(Molli); 356 357 } 358 359 348 //void LuoPikkuMolli2() 349 //{ 350 // PhysicsObject Molli = new PhysicsObject(30, 30); 351 // //(RandomGen.NextDouble(5, 20), RandomGen.NextDouble(5, 20)); 352 // Molli.Shape = Shape.Circle; 353 // Molli.Color = Color.Yellow; 354 // Molli.X = RandomGen.NextDouble(Level.Left + 10, Level.Right - 10); 355 // Molli.Y = RandomGen.NextDouble(Level.Bottom + 10, Level.Top - 10); 356 // Add(Molli); 357 358 //} 359 360 void TekoAly2() 361 { 362 FollowerBrain seuraajanAivot = new FollowerBrain(Kolmio2); 363 Kolmio.Brain = seuraajanAivot; 364 seuraajanAivot.Speed = 2000; 365 seuraajanAivot.DistanceFar = 1000; 366 seuraajanAivot.DistanceClose = 0; 367 seuraajanAivot.StopWhenTargetClose = true; 368 } 360 369 361 370 … … 370 379 { 371 380 Timer aikaLaskuri2 = new Timer(); 372 aikaLaskuri2.Interval = 30;381 aikaLaskuri2.Interval = 60; 373 382 aikaLaskuri2.Timeout += AikaLoppui; 374 383 aikaLaskuri2.Start(1); … … 395 404 { 396 405 Keyboard.Listen(Key.W, ButtonState.Down, Liikuta, "Pelaaja liikkuu eteenpäin", Kolmio, 100000.0); 397 Keyboard.Listen(Key.Up, ButtonState.Down, Liikuta, "pelaaja liikkuu eteenpäin", Kolmio2, 1000.0);398 Keyboard.Listen(Key.Right, ButtonState.Down, pyorita, "pelaaja pyörii oikealle", Kolmio2, - 50.0);399 Keyboard.Listen(Key.D, ButtonState.Down, pyorita, "Pelaaja pyörii oikealle", Kolmio, - 50.0);400 Keyboard.Listen(Key.A, ButtonState.Down, pyorita, "pelaaja pyörii vasemmalle", Kolmio, 50.0);401 Keyboard.Listen(Key.Left, ButtonState.Down, pyorita, "pelaaja pyörii vasemmalle", Kolmio2, 50.0);406 Keyboard.Listen(Key.Up, ButtonState.Down, Liikuta, "pelaaja liikkuu eteenpäin", Kolmio2, 70.0); 407 Keyboard.Listen(Key.Right, ButtonState.Down, pyorita, "pelaaja pyörii oikealle", Kolmio2, -2.5); 408 Keyboard.Listen(Key.D, ButtonState.Down, pyorita, "Pelaaja pyörii oikealle", Kolmio, -30.0); 409 Keyboard.Listen(Key.A, ButtonState.Down, pyorita, "pelaaja pyörii vasemmalle", Kolmio, 30.0); 410 Keyboard.Listen(Key.Left, ButtonState.Down, pyorita, "pelaaja pyörii vasemmalle", Kolmio2, 2.5); 402 411 403 412 } -
2012/26/JereL/Sekasorto/Sekasorto/SekasortoContent/SekasortoContent.contentproj
r3308 r3317 45 45 </ItemGroup> 46 46 <ItemGroup> 47 <Compile Include="YEEEEAAAAAAAAHH.mp3">48 <Name>YEEEEAAAAAAAAHH</Name>49 <Importer>Mp3Importer</Importer>50 <Processor>SongProcessor</Processor>51 </Compile>52 </ItemGroup>53 <ItemGroup>54 47 <Compile Include="Trolface.png"> 55 48 <Name>Trolface</Name> … … 65 58 </Compile> 66 59 </ItemGroup> 60 <ItemGroup> 61 <Compile Include="Yeah.mp3"> 62 <Name>Yeah</Name> 63 <Importer>Mp3Importer</Importer> 64 <Processor>SongProcessor</Processor> 65 </Compile> 66 </ItemGroup> 67 67 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 68 68 <!-- 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.