- Timestamp:
- 2012-06-07 10:52:38 (11 years ago)
- Location:
- 2012/23/LeoS/leoS
- Files:
-
- 2 added
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
2012/23/LeoS/leoS/leoS/leoS.cs
r2824 r2828 12 12 bool pelaajaIlmassa = false; 13 13 SoundEffect hyppyAani = LoadSoundEffect("Jump"); 14 14 Image extrakuva = LoadImage("Antigravity"); 15 15 16 16 public override void Begin() 17 17 { 18 18 ClearAll(); 19 MultiSelectWindow valikko = new MultiSelectWindow ("Menu", " Control Help", "Level 1", "Level 2", "Level 3",19 MultiSelectWindow valikko = new MultiSelectWindow ("Menu", "Read This Before\nYou Start Game", "Level 1", "Level 2", "Level 3", 20 20 "Level 4", "Exit Game" ); valikko.ItemSelected += PainettiinValikonNappia; 21 21 valikko.Color = Color.Gold; … … 28 28 void AloitaPeli(string levelFile) 29 29 { 30 31 32 33 30 34 LataaKentta(levelFile); 31 35 … … 33 37 Level.Background.CreateGradient(Color.Teal, Color.Ruby); 34 38 Gravity = new Vector(0, -400); 35 36 MediaPlayer.Play("Tausta"); 39 LuoAikaLaskuri3(); 40 41 //MediaPlayer.Play("Tausta"); 37 42 38 43 Surface alareuna = Surface.CreateBottom(Level); … … 81 86 ruudut.SetTileMethod('*', LuoEste); 82 87 ruudut.SetTileMethod('T', LuoTykki); 83 ruudut.SetTileMethod('W', LuoExtra);84 88 ruudut.Execute(20, 20); 85 89 } … … 97 101 AddCollisionHandler(pelaaja, "tahti", PelaajaOsuiTahtiin); 98 102 pelaaja.Restitution = 100.00; 103 pelaaja.Tag = "pelaaja"; 99 104 Add(pelaaja); 100 105 } 101 106 102 void LuoExtra(Vector paikka, double leveys, double korkeus) 103 { 104 PhysicsObject extra = PhysicsObject.CreateStaticObject(leveys, 105 korkeus, Shape.Ellipse); 106 extra.Position = paikka; 107 extra.Color = Color.Ivory; 108 Add(extra); 109 } 110 111 112 107 113 108 void PelaajaOsuiReunaan(PhysicsObject tormaaja, PhysicsObject kohde) 114 109 { … … 145 140 Add(este); 146 141 } 142 147 143 void AsetaOhjaimet() 148 144 { … … 165 161 pelaaja.Velocity = nopeus; 166 162 pelaajaIlmassa = true; 167 hyppyAani.Play();163 //hyppyAani.Play(); 168 164 169 165 } … … 271 267 272 268 Label tekstikentta = new Label("teksti"); 273 tekstikentta.Text = "You Jump with UP-Button,Move Forward with RIGHT-Button and Jump Down with DOWN-Button"; 269 tekstikentta.Text = "Jump with UP-Button,Move forward with RIGHT-Button and Jump down with DOWN-Button\nyou have 2 minutes to reach the goal,if you ran out of time,\nyou will automatically return to Menu"; 270 274 271 tekstikentta.TextColor = Color.Red; 275 272 tekstikentta.Font = Font.DefaultLargeBold; … … 292 289 293 290 } 294 void Poiminta() 295 { 296 297 } 291 void LuoAikaLaskuri3() 292 { 293 Timer aikaLaskuri = new Timer(); 294 aikaLaskuri.Interval = 30; 295 aikaLaskuri.Timeout += delegate { AikaLoppui(); }; 296 aikaLaskuri.Start(); 297 Label aikaKentta = new Label(); 298 aikaKentta.TextColor = Color.Red; 299 aikaKentta.Color = Color.Yellow; 300 aikaKentta.X = 0.0; 301 aikaKentta.Y = -400.0; 302 aikaKentta.BindTo(aikaLaskuri.SecondCounter); 303 Add(aikaKentta); 304 305 } 306 void AikaLoppui() 307 { 308 ClearAll(); 309 Label tekstikentta3 = new Label("teksti"); 310 tekstikentta3.Text = "You are too slow"; 311 tekstikentta3.TextColor = Color.Silver; 312 Add(tekstikentta3); 313 LuoAikaLaskuri4(); 314 } 315 void LuoAikaLaskuri4() 316 { 317 Timer aikaLaskuri = new Timer(); 318 aikaLaskuri.Interval = 2; 319 aikaLaskuri.Timeout += delegate { Begin(); }; 320 aikaLaskuri.Start(); 321 } 322 298 323 } 299 324 -
2012/23/LeoS/leoS/leoS/leoS.csproj
r2798 r2828 17 17 <XnaCrossPlatformGroupID>0c1cb67a-6006-4555-b159-c261714208f1</XnaCrossPlatformGroupID> 18 18 <XnaOutputType>Game</XnaOutputType> 19 <ApplicationIcon>Game.ico</ApplicationIcon> 19 <ApplicationIcon> 20 </ApplicationIcon> 20 21 <Thumbnail>GameThumbnail.png</Thumbnail> 21 22 <PublishUrl>publish\</PublishUrl> -
2012/23/LeoS/leoS/leoS/leoS.csproj.Debug.cachefile
r2824 r2828 7 7 Content\Tausta2.xnb 8 8 Content\Jump.xnb 9 Content\Antigravity.xnb 9 10 Content\Tausta.wma 10 11 Content\Tausta2.wma -
2012/23/LeoS/leoS/leoS/obj/x86/Debug/cachefile-{25605763-3341-4275-93D9-4B0A394A16A7}-targetpath.txt
r2824 r2828 9 9 Content\Tausta2.wma 10 10 Content\Jump.xnb 11 Content\Antigravity.xnb 11 12 Content\kentta1.txt -
2012/23/LeoS/leoS/leoS/obj/x86/Debug/leoS.csproj.FileListAbsolute.txt
r2824 r2828 34 34 J:\LeoS\LeoS\leoS\leoS\bin\x86\Debug\Content\Tausta2.wma 35 35 J:\LeoS\LeoS\leoS\leoS\bin\x86\Debug\Content\Jump.xnb 36 J:\LeoS\LeoS\leoS\leoS\bin\x86\Debug\Content\Antigravity.xnb -
2012/23/LeoS/leoS/leoSContent/kentta2.txt
r2820 r2828 61 61 * # T # # # # 62 62 ###### * # # ################### # 63 * # 63 * # T ################################# ############# 64 64 * # ######## # 65 # # * # 65 # # * # T # T 66 66 # # ******* # # 67 67 # # # # 68 # # ## # # # 69 P # # ########## 70 ############ ###### ########## ##### 68 # # ## # # # T T # ########## # # # # # # 69 P # # ########## # # T # # # 70 ############ ###### ########## ##### # # -
2012/23/LeoS/leoS/leoSContent/leoSContent.contentproj
r2824 r2828 101 101 </Compile> 102 102 </ItemGroup> 103 <ItemGroup> 104 <Compile Include="Antigravity.png"> 105 <Name>Antigravity</Name> 106 <Importer>TextureImporter</Importer> 107 <Processor>TextureProcessor</Processor> 108 </Compile> 109 </ItemGroup> 103 110 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 104 111 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
2012/23/LeoS/leoS/leoSContent/obj/x86/Debug/ContentPipeline.xml
r2824 r2828 27 27 <Options>None</Options> 28 28 <Output>J:\LeoS\LeoS\leoS\leoS\bin\x86\Debug\Content\kentta2.xnb</Output> 29 <Time>2012-06-0 6T16:23:02.7235805+03:00</Time>29 <Time>2012-06-07T09:53:17.0894083+03:00</Time> 30 30 </Item> 31 31 <Item> … … 76 76 <Time>2012-06-06T19:14:48.3999495+03:00</Time> 77 77 </Item> 78 <Item> 79 <Source>Antigravity.png</Source> 80 <Name>Antigravity</Name> 81 <Importer>TextureImporter</Importer> 82 <Processor>TextureProcessor</Processor> 83 <Options>None</Options> 84 <Output>J:\LeoS\LeoS\leoS\leoS\bin\x86\Debug\Content\Antigravity.xnb</Output> 85 <Time>2012-06-07T09:07:21.2011363+03:00</Time> 86 </Item> 78 87 <BuildSuccessful>true</BuildSuccessful> 79 88 <Settings>
Note: See TracChangeset
for help on using the changeset viewer.