Changeset 3867 for 2012/10-20/LeoL
- Timestamp:
- 2012-10-20 15:58:03 (11 years ago)
- Location:
- 2012/10-20/LeoL/Super Mario classic
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
2012/10-20/LeoL/Super Mario classic/Super Mario classic/Super Mario classic/Super Mario classic.csproj
r3861 r3867 120 120 </ItemGroup> 121 121 <ItemGroup> 122 <ProjectReference Include="..\Super_Mario_classicContent\Super_Mario_classicContent.contentproj"> 123 <Name>Super_Mario_classicContent</Name> 122 <ProjectReference Include="..\Super Mario classicContent\Super Mario classicContent.contentproj"> 123 <Project>{93A0E60D-E2E7-4F29-82A2-FA9BC2248856}</Project> 124 <Name>Super Mario classicContent %28Content%29</Name> 124 125 <XnaReferenceType>Content</XnaReferenceType> 125 126 </ProjectReference> -
2012/10-20/LeoL/Super Mario classic/Super Mario classic/Super Mario classic/Super_Mario_classic.cs
r3861 r3867 14 14 15 15 PlatformCharacter pelaaja1; 16 17 Image pelaajanKuva = LoadImage(" norsu");18 Image tahtiKuva = LoadImage(" tahti");16 Image maalinKuva = LoadImage("End Block"); 17 Image pelaajanKuva = LoadImage("Mario"); 18 Image tahtiKuva = LoadImage("Coin"); 19 19 // mario = Image.Mirror(pelaajanKuva); 20 20 SoundEffect maaliAani = LoadSoundEffect("maali"); 21 21 Image PalikkanKuva = LoadImage("multa"); 22 22 public override void Begin() 23 23 { 24 Gravity = new Vector(0, -1000);24 25 25 26 LuoKentta(); 26 LuoKentta("kentta1"); 27 28 } 29 30 void LuoKentta(string kenttatiedosto) 31 { 32 TileMap kentta = TileMap.FromLevelAsset(kenttatiedosto); 33 kentta.SetTileMethod('#', LisaaTaso); 34 kentta.SetTileMethod('*', LisaaTahti); 35 kentta.SetTileMethod('N', LisaaPelaaja); 36 kentta.SetTileMethod('E', LisaaMaali); 37 kentta.SetTileMethod('s', LisaaDeath); 38 kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 39 Level.CreateBorders(); 40 Level.Background.CreateGradient(Color.Brown 41 , Color.Black); 42 27 43 LisaaNappaimet(); 28 44 … … 30 46 Camera.ZoomFactor = 1.2; 31 47 Camera.StayInLevel = true; 48 49 Gravity = new Vector(0, -1000); 32 50 } 33 34 void LuoKentta() 51 void LisaaMaali(Vector paikka, double leveys, double korkeus) 35 52 { 36 TileMap kentta = TileMap.FromLevelAsset("kentta1"); 37 kentta.SetTileMethod('#', LisaaTaso); 38 kentta.SetTileMethod('*', LisaaTahti); 39 kentta.SetTileMethod('N', LisaaPelaaja); 40 kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 41 Level.CreateBorders(); 42 Level.Background.CreateGradient(Color.White, Color.SkyBlue); 53 PhysicsObject taso = PhysicsObject.CreateStaticObject(leveys, korkeus); 54 taso.Position = paikka; 55 taso.Image = maalinKuva; 56 Add(taso); 57 taso.Tag = "End block"; 43 58 } 44 45 59 void LisaaTaso(Vector paikka, double leveys, double korkeus) 46 60 { 47 61 PhysicsObject taso = PhysicsObject.CreateStaticObject(leveys, korkeus); 48 62 taso.Position = paikka; 49 taso. Color = Color.Green;63 taso.Image = PalikkanKuva; 50 64 Add(taso); 51 } 65 } 52 66 53 67 void LisaaTahti(Vector paikka, double leveys, double korkeus) … … 57 71 tahti.Position = paikka; 58 72 tahti.Image = tahtiKuva; 59 tahti.Tag = " tahti";73 tahti.Tag = "coin"; 60 74 Add(tahti); 61 75 } … … 67 81 pelaaja1.Mass = 4.0; 68 82 pelaaja1.Image = pelaajanKuva; 69 AddCollisionHandler(pelaaja1, "tahti", TormaaTahteen); 83 AddCollisionHandler(pelaaja1, "coin", TormaaTahteen); 84 AddCollisionHandler(pelaaja1, "End block", TormaaMaaliin); 70 85 Add(pelaaja1); 71 86 } … … 102 117 { 103 118 maaliAani.Play(); 104 MessageDisplay.Add(" Keräsit tähden!");119 MessageDisplay.Add("You have a coin"); 105 120 tahti.Destroy(); 106 121 } 122 123 void TormaaMaaliin(PhysicsObject maali, PhysicsObject tormaaja) 124 { 125 ClearAll(); 126 LuoKentta("kentta2"); 127 } 128 107 129 } -
2012/10-20/LeoL/Super Mario classic/Super Mario classic/Super Mario classic/obj/x86/Debug/Super Mario classic.csproj.FileListAbsolute.txt
r3861 r3867 7 7 C:\MyTemp\ohjelmointikerho\SMC\Super Mario classic\Super Mario classic\Super Mario classic\obj\x86\Debug\Super Mario classic.exe 8 8 C:\MyTemp\ohjelmointikerho\SMC\Super Mario classic\Super Mario classic\Super Mario classic\obj\x86\Debug\Super Mario classic.pdb 9 C:\MyTemp\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Super Mario classic.exe 10 C:\MyTemp\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Super Mario classic.pdb 11 C:\MyTemp\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Jypeli.dll 12 C:\MyTemp\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Jypeli.xml 13 C:\MyTemp\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\obj\x86\Debug\ResolveAssemblyReference.cache 14 C:\MyTemp\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\obj\x86\Debug\Microsoft.Xna.Framework.RuntimeProfile.txt 15 C:\MyTemp\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\obj\x86\Debug\Super Mario classic.exe 16 C:\MyTemp\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\obj\x86\Debug\Super Mario classic.pdb 17 C:\MyTemp\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Content\maali.xnb 18 C:\MyTemp\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Content\norsu.xnb 19 C:\MyTemp\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Content\tahti.xnb 20 C:\MyTemp\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Content\kentta1.xnb 21 C:\MyTemp\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Content\Mario.xnb 22 C:\MyTemp\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Content\multa.xnb 23 C:\MyTemp\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Content\Coin.xnb 24 C:\MyTemp\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Content\End block.xnb 25 C:\MyTemp\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Content\kentta2.xnb -
2012/10-20/LeoL/Super Mario classic/Super Mario classic/Super Mario classicContent/Super Mario classicContent.contentproj
r3861 r3867 66 66 </Compile> 67 67 </ItemGroup> 68 <ItemGroup> 69 <Compile Include="Mario.png"> 70 <Name>Mario</Name> 71 <Importer>TextureImporter</Importer> 72 <Processor>TextureProcessor</Processor> 73 </Compile> 74 </ItemGroup> 75 <ItemGroup> 76 <Compile Include="multa.png"> 77 <Name>multa</Name> 78 <Importer>TextureImporter</Importer> 79 <Processor>TextureProcessor</Processor> 80 </Compile> 81 </ItemGroup> 82 <ItemGroup> 83 <Compile Include="Coin.png"> 84 <Name>Coin</Name> 85 <Importer>TextureImporter</Importer> 86 <Processor>TextureProcessor</Processor> 87 </Compile> 88 </ItemGroup> 89 <ItemGroup> 90 <Compile Include="End block.png"> 91 <Name>End block</Name> 92 <Importer>TextureImporter</Importer> 93 <Processor>TextureProcessor</Processor> 94 </Compile> 95 </ItemGroup> 96 <ItemGroup> 97 <Compile Include="kentta2.txt"> 98 <Name>kentta2</Name> 99 <Importer>TextFileImporter</Importer> 100 <Processor>TextFileContentProcessor</Processor> 101 </Compile> 102 </ItemGroup> 68 103 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 69 104 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
2012/10-20/LeoL/Super Mario classic/Super Mario classic/Super Mario classicContent/kentta1.txt
r3861 r3867 1 * 2 ## 3 4 * * 5 ## ## 6 7 * * 8 ## ## ## 9 10 * * * * 11 ## ## ## ## 12 13 * * * * 14 ## ## ## ## ## 15 16 N 17 ###################### 1 * * E 2 ********************** ******** ******* *** 3 * N # ******** ****** ###########***** ###***** 4 ################# ########################### 5 #################sss###########################ssssssssss
Note: See TracChangeset
for help on using the changeset viewer.