- Timestamp:
- 2011-06-10 10:02:16 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
2011/23/ookantol/Haamuongelma/Haamuongelma/Peli.cs
r1847 r1858 36 36 { 37 37 aloitusvalikko(); 38 MediaPlayer.Play("MTA");39 MediaPlayer.IsRepeating = true;38 //MediaPlayer.Play("MTA"); 39 //MediaPlayer.IsRepeating = true; 40 40 } 41 41 … … 309 309 310 310 Label kohta1 = new Label("Start Game"); 311 kohta1.Position = new Vector(0, 60);311 kohta1.Position = new Vector(0, 80); 312 312 Valikonkohdat.Add(kohta1); 313 313 314 314 Label kohta2 = new Label("Exit"); 315 kohta2.Position = new Vector(0, - 60);315 kohta2.Position = new Vector(0, -80); 316 316 Valikonkohdat.Add(kohta2); 317 317 318 318 Label kohta3 = new Label("Fields"); 319 kohta3.Position = new Vector(0, 10);319 kohta3.Position = new Vector(0, 30); 320 320 Valikonkohdat.Add(kohta3); 321 321 322 Label kohta4 = new Label("Instructions"); 323 kohta4.Position = new Vector(0, - 20); 324 Valikonkohdat.Add(kohta4); 325 322 326 323 327 foreach (Label Valikonkohta in Valikonkohdat) 328 { 329 Valikonkohta.TextColor = Color.White; 324 330 Add(Valikonkohta); 331 } 325 332 326 333 Mouse.ListenOn(kohta1, MouseButton.Left, ButtonState.Pressed, Start, null); 327 334 Mouse.ListenOn(kohta2, MouseButton.Left, ButtonState.Pressed, Lopeta, null); 328 335 Mouse.ListenOn(kohta3, MouseButton.Left, ButtonState.Pressed, kentat, null); 336 Mouse.ListenOn(kohta4, MouseButton.Left, ButtonState.Pressed, ohjeet, null); 337 338 Keyboard.Listen(Key.Enter, ButtonState.Pressed, Start, null); 329 339 330 340 Mouse.IsCursorVisible = true; … … 340 350 Level.Background.CreateGradient(Color.Orange, Color.White); 341 351 342 Label kohta3 = new Label(" Just a normal day. Buddy is on his way home, when he sees mean ghosts. Lots of them. He tries to avoid them, but then he meets dying flowers, which were dying because of the ghosts took all the energy out of the air. To help them, Buddy must destroy all the ghosts andcollect clocks, that reverse time...");352 Label kohta3 = new Label(" Just a normal day. Buddy is on his way home, when he sees mean ghosts. Lots of them. He tries to avoid them, but then he meets dying flowers, which are dying because the ghosts took all the good energy out of the air. To help them, Buddy must destroy all the ghosts and collect clocks, that reverse time..."); 343 353 kohta3.Size = new Vector(600, 130); 344 354 kohta3.SizeMode = TextSizeMode.Wrapped; … … 353 363 354 364 foreach (Label Valikonkohta in Valikonkohdat) 365 { 366 Valikonkohta.TextColor = Color.White; 355 367 Add(Valikonkohta); 368 } 356 369 357 370 Mouse.ListenOn(kohta4, MouseButton.Left, ButtonState.Pressed, Aloita, null); … … 371 384 372 385 Label kohta1 = new Label("Field 1"); 373 kohta1.Position = new Vector(0, 60);386 kohta1.Position = new Vector(0, 80); 374 387 Valikonkohdat.Add(kohta1); 375 388 376 389 Label kohta2 = new Label("Field 2"); 377 kohta2.Position = new Vector(0, 0);390 kohta2.Position = new Vector(0, 20); 378 391 Valikonkohdat.Add(kohta2); 379 392 380 393 Label kohta3 = new Label("Field 3"); 381 kohta3.Position = new Vector(0, - 60);394 kohta3.Position = new Vector(0, - 40); 382 395 Valikonkohdat.Add(kohta3); 383 396 … … 385 398 386 399 foreach (Label Valikonkohta in Valikonkohdat) 400 { 401 Valikonkohta.TextColor = Color.White; 387 402 Add(Valikonkohta); 403 } 388 404 389 405 Mouse.ListenOn(kohta1, MouseButton.Left, ButtonState.Pressed, Aloita, null); … … 397 413 398 414 } 415 416 void ohjeet() 417 { 418 ClearAll(); 419 Valikonkohdat = new List<Label>(); 420 Level.Background.CreateGradient(Color.Orange, Color.White); 421 422 Label kohta1 = new Label(" Move Buddy with the arrow keys or with A, D and W keys. Collect clocks, and destroy all the ghosts by jumping on them."); 423 kohta1.Size = new Vector(600, 130); 424 kohta1.SizeMode = TextSizeMode.Wrapped; 425 kohta1.Position = new Vector(0, 100); 426 kohta1.TextColor = Color.Orange; 427 Add(kohta1); 428 429 Label kohta2 = new Label("Back"); 430 kohta2.Position = new Vector(0, -20); 431 kohta2.TextColor = Color.White; 432 Valikonkohdat.Add(kohta2); 433 434 foreach (Label Valikonkohta in Valikonkohdat) 435 { 436 Valikonkohta.TextColor = Color.White; 437 Add(Valikonkohta); 438 } 439 440 Mouse.ListenOn(kohta2, MouseButton.Left, ButtonState.Pressed, aloitusvalikko, null); 441 Keyboard.Listen(Key.Escape, ButtonState.Pressed, aloitusvalikko, null); 442 443 Mouse.ListenMovement(1.0, ValikossaLiikkuminen2, null); 444 445 Mouse.IsCursorVisible = true; 446 } 399 447 void Lopeta() 400 448 {
Note: See TracChangeset
for help on using the changeset viewer.