- Timestamp:
- 2015-06-23 11:08:07 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
2015/26/ohjaajat/HillbillyRun/HillbillyRun/HillbillyRun/HillbillyRun/HillbillyRun.cs
r6159 r6161 41 41 public override void Begin() 42 42 { 43 //IntroSequence(); 44 MainMenu(); 45 } 46 47 void IntroSequence() 48 { 49 Level.Background.Color = Color.Black; 50 51 Label storyLabel = new Label("Once upon a time..."); 52 storyLabel.TextColor = Color.Gray; 53 Add(storyLabel); 54 55 Timer textTimer = new Timer(); 56 textTimer.Interval = 0.5; 57 textTimer.Timeout += delegate 58 { 59 // TODO vaalenna tekstiä näkyville läpinäkyvyyttä tms. säätämällä 60 61 }; 62 63 // TODO siirrä aliohjelmaan, jolle voi antaa parametrina stringin, joka näytetään siististi feidaamalla esille 64 65 66 67 // TODO replace this SingleShot with something else. It must be the last thing after the intro sequence 68 69 // Clean up after the intro: 70 Timer.SingleShot(5, delegate 71 { 72 storyLabel.Destroy(); 73 74 ClearAll(); 75 MainMenu(); 76 }); 77 } 78 79 void MainMenu() 80 { 81 Level.Background.Color = Color.MediumBlue; 82 83 MultiSelectWindow mainmenu = new MultiSelectWindow("Main menu", 84 "Start game", "Credits", "Exit"); 85 mainmenu.AddItemHandler(0, StartGame); 86 mainmenu.AddItemHandler(1, ShowCredits); 87 mainmenu.AddItemHandler(2, Exit); 88 mainmenu.DefaultCancel = 2; 89 Add(mainmenu); 90 } 91 92 void ShowCredits() 93 { 94 MessageWindow win = new MessageWindow("This game was made in one week by\nSimo Rinne,\nEmma Heikura,\n and Jouni Potila\n using University of Jyväskylä's\n game programming library Jypeli"); 95 win.Closed += delegate 96 { 97 ClearAll(); 98 MainMenu(); 99 }; 100 Add(win); 101 } 102 103 void StartGame() 104 { 105 43 106 CreateLevel(); 44 107 Extras();
Note: See TracChangeset
for help on using the changeset viewer.