Changeset 3887
- Timestamp:
- 2012-11-17 16:09:35 (11 years ago)
- Location:
- 2012/10-20/LeoL/Super Mario classic
- Files:
-
- 8 added
- 3 deleted
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
2012/10-20/LeoL/Super Mario classic/Super Mario classic/Super Mario classic/Super_Mario_classic.cs
r3867 r3887 14 14 15 15 PlatformCharacter pelaaja1; 16 Image maalinKuva = LoadImage("End Block"); 17 Image pelaajanKuva = LoadImage("Mario"); 18 Image tahtiKuva = LoadImage("Coin"); 16 Image Vihukuva = LoadImage("Iggy"); 17 Image maalinKuva = LoadImage("Chest"); 18 Image pelaajanKuva = LoadImage("Boo"); 19 Image tahtiKuva = LoadImage("Lava coin"); 19 20 // mario = Image.Mirror(pelaajanKuva); 20 21 SoundEffect maaliAani = LoadSoundEffect("maali"); 21 Image PalikkanKuva = LoadImage("multa"); 22 Image PalikkanKuva = LoadImage("Maa W1"); 23 24 // Pelin alussa ollaan kentässä 1 25 int kenttaNro = 1; 26 22 27 public override void Begin() 23 28 { 24 29 SeuraavaKentta(); 30 } 31 void SeuraavaKentta() 32 { 33 ClearAll (); 25 34 26 LuoKentta("kentta1"); 35 if(kenttaNro == 1) LuoKentta("Kentta1"); 36 else if (kenttaNro == 2) LuoKentta("kentta2"); 37 else if(kenttaNro == 3) LuoKentta("Kentta3"); 38 else if(kenttaNro > 3) Exit(); 27 39 28 40 } … … 35 47 kentta.SetTileMethod('N', LisaaPelaaja); 36 48 kentta.SetTileMethod('E', LisaaMaali); 37 kentta.SetTileMethod('s', LisaaDeath); 49 kentta.SetTileMethod('K', LisaaVihu); 50 //kentta.SetTileMethod('s', LisaaDeath); 38 51 kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 39 52 Level.CreateBorders(); 40 Level.Background.CreateGradient(Color. Brown53 Level.Background.CreateGradient(Color.DarkRed 41 54 , Color.Black); 42 55 … … 55 68 taso.Image = maalinKuva; 56 69 Add(taso); 57 taso.Tag = " End block";70 taso.Tag = "Chest"; 58 71 } 59 72 void LisaaTaso(Vector paikka, double leveys, double korkeus) … … 63 76 taso.Image = PalikkanKuva; 64 77 Add(taso); 65 } 78 } 66 79 67 80 void LisaaTahti(Vector paikka, double leveys, double korkeus) … … 71 84 tahti.Position = paikka; 72 85 tahti.Image = tahtiKuva; 73 tahti.Tag = " coin";86 tahti.Tag = "Lava coin"; 74 87 Add(tahti); 75 88 } … … 81 94 pelaaja1.Mass = 4.0; 82 95 pelaaja1.Image = pelaajanKuva; 83 AddCollisionHandler(pelaaja1, " coin", TormaaTahteen);84 AddCollisionHandler(pelaaja1, " End block", TormaaMaaliin);96 AddCollisionHandler(pelaaja1, "Lava coin", TormaaTahteen); 97 AddCollisionHandler(pelaaja1, "Chest", TormaaMaaliin); 85 98 Add(pelaaja1); 86 99 } … … 117 130 { 118 131 maaliAani.Play(); 119 MessageDisplay.Add(" You havea coin");132 MessageDisplay.Add("Lava coin"); 120 133 tahti.Destroy(); 121 134 } … … 123 136 void TormaaMaaliin(PhysicsObject maali, PhysicsObject tormaaja) 124 137 { 125 ClearAll(); 126 LuoKentta("kentta2"); 138 kenttaNro++; 139 SeuraavaKentta(); 140 } 141 142 void LisaaVihu(Vector paikka, double leveys, double korkeus) 143 { 144 PhysicsObject Vihu = PhysicsObject.CreateStaticObject(leveys, korkeus); 145 Vihu.IgnoresCollisionResponse = true; 146 Vihu.Position = paikka; 147 Vihu.Image = Vihukuva; 148 Vihu.Tag = "Iggy"; 149 Add(Vihu); 127 150 } 128 151 -
2012/10-20/LeoL/Super Mario classic/Super Mario classic/Super Mario classic/obj/x86/Debug/Super Mario classic.csproj.FileListAbsolute.txt
r3867 r3887 24 24 C:\MyTemp\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Content\End block.xnb 25 25 C:\MyTemp\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Content\kentta2.xnb 26 C:\MyTemp\ohjelmointikerho\10-20\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\obj\x86\Debug\Super Mario classic.exe 27 C:\MyTemp\ohjelmointikerho\10-20\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\obj\x86\Debug\Super Mario classic.pdb 28 C:\MyTemp\ohjelmointikerho\10-20\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Content\maali.xnb 29 C:\MyTemp\ohjelmointikerho\10-20\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Content\kentta1.xnb 30 C:\MyTemp\ohjelmointikerho\10-20\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Content\kentta2.xnb 31 C:\MyTemp\ohjelmointikerho\10-20\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Content\Boo.xnb 32 C:\MyTemp\ohjelmointikerho\10-20\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Content\Maa W1.xnb 33 C:\MyTemp\ohjelmointikerho\10-20\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Super Mario classic.exe 34 C:\MyTemp\ohjelmointikerho\10-20\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Super Mario classic.pdb 35 C:\MyTemp\ohjelmointikerho\10-20\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Jypeli.dll 36 C:\MyTemp\ohjelmointikerho\10-20\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Jypeli.xml 37 C:\MyTemp\ohjelmointikerho\10-20\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\obj\x86\Debug\ResolveAssemblyReference.cache 38 C:\MyTemp\ohjelmointikerho\10-20\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\obj\x86\Debug\Microsoft.Xna.Framework.RuntimeProfile.txt 39 C:\MyTemp\ohjelmointikerho\10-20\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Content\Lava coin.xnb 40 C:\MyTemp\ohjelmointikerho\10-20\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Content\Chest.xnb 41 C:\MyTemp\ohjelmointikerho\10-20\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Content\Maa Castle.xnb 42 C:\MyTemp\ohjelmointikerho\10-20\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Content\kentta3.xnb 43 C:\MyTemp\ohjelmointikerho\10-20\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Content\Iggy.xnb -
2012/10-20/LeoL/Super Mario classic/Super Mario classic/Super Mario classicContent/Super Mario classicContent.contentproj
r3867 r3887 45 45 </ItemGroup> 46 46 <ItemGroup> 47 <Compile Include="kentta1.txt"> 48 <Name>kentta1</Name> 49 <Importer>TextFileImporter</Importer> 50 <Processor>TextFileContentProcessor</Processor> 51 </Compile> 47 52 <Compile Include="maali.wav"> 48 53 <Name>maali</Name> … … 50 55 <Processor>SoundEffectProcessor</Processor> 51 56 </Compile> 52 <Compile Include="norsu.png">53 <Name>norsu</Name>54 <Importer>TextureImporter</Importer>55 <Processor>TextureProcessor</Processor>56 </Compile>57 <Compile Include="tahti.png">58 <Name>tahti</Name>59 <Importer>TextureImporter</Importer>60 <Processor>TextureProcessor</Processor>61 </Compile>62 <Compile Include="kentta1.txt">63 <Name>kentta1</Name>64 <Importer>TextFileImporter</Importer>65 <Processor>TextFileContentProcessor</Processor>66 </Compile>67 57 </ItemGroup> 68 58 <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> 59 <Compile Include="Boo.png"> 60 <Name>Boo</Name> 92 61 <Importer>TextureImporter</Importer> 93 62 <Processor>TextureProcessor</Processor> … … 101 70 </Compile> 102 71 </ItemGroup> 72 <ItemGroup> 73 <Compile Include="Maa W1.png"> 74 <Name>Maa W1</Name> 75 <Importer>TextureImporter</Importer> 76 <Processor>TextureProcessor</Processor> 77 </Compile> 78 </ItemGroup> 79 <ItemGroup> 80 <Compile Include="Lava coin.png"> 81 <Name>Lava coin</Name> 82 <Importer>TextureImporter</Importer> 83 <Processor>TextureProcessor</Processor> 84 </Compile> 85 </ItemGroup> 86 <ItemGroup> 87 <Compile Include="Chest.png"> 88 <Name>Chest</Name> 89 <Importer>TextureImporter</Importer> 90 <Processor>TextureProcessor</Processor> 91 </Compile> 92 </ItemGroup> 93 <ItemGroup> 94 <Compile Include="Maa Castle.png"> 95 <Name>Maa Castle</Name> 96 <Importer>TextureImporter</Importer> 97 <Processor>TextureProcessor</Processor> 98 </Compile> 99 </ItemGroup> 100 <ItemGroup> 101 <Compile Include="kentta3.txt"> 102 <Name>kentta3</Name> 103 <Importer>TextFileImporter</Importer> 104 <Processor>TextFileContentProcessor</Processor> 105 </Compile> 106 </ItemGroup> 107 <ItemGroup> 108 <Compile Include="Iggy.png"> 109 <Name>Iggy</Name> 110 <Importer>TextureImporter</Importer> 111 <Processor>TextureProcessor</Processor> 112 </Compile> 113 </ItemGroup> 103 114 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 104 115 <!-- 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.