Changeset 907
- Timestamp:
- 2010-06-16 13:48:31 (13 years ago)
- Location:
- 2010/24/timisahe/Makkarajahti
- Files:
-
- 5 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
2010/24/timisahe/Makkarajahti/Content/Content.contentproj
r898 r907 75 75 </Compile> 76 76 </ItemGroup> 77 <ItemGroup> 78 <Compile Include="seina.png"> 79 <Name>seina</Name> 80 <Importer>TextureImporter</Importer> 81 <Processor>TextureProcessor</Processor> 82 </Compile> 83 </ItemGroup> 84 <ItemGroup> 85 <Compile Include="maa.png"> 86 <Name>maa</Name> 87 <Importer>TextureImporter</Importer> 88 <Processor>TextureProcessor</Processor> 89 </Compile> 90 </ItemGroup> 91 <ItemGroup> 92 <Compile Include="lattiaend.png"> 93 <Name>lattiaend</Name> 94 <Importer>TextureImporter</Importer> 95 <Processor>TextureProcessor</Processor> 96 </Compile> 97 </ItemGroup> 98 <ItemGroup> 99 <Compile Include="maaend.png"> 100 <Name>maaend</Name> 101 <Importer>TextureImporter</Importer> 102 <Processor>TextureProcessor</Processor> 103 </Compile> 104 </ItemGroup> 105 <ItemGroup> 106 <Compile Include="piikit.png"> 107 <Name>piikit</Name> 108 <Importer>TextureImporter</Importer> 109 <Processor>TextureProcessor</Processor> 110 </Compile> 111 </ItemGroup> 77 112 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 78 113 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
2010/24/timisahe/Makkarajahti/Peli.cs
r898 r907 14 14 15 15 PlatformCharacter pelaaja1; 16 Vector aloituspaikka; 16 17 17 18 int kenttaNro; // monesko kenttä on menossa … … 72 73 } 73 74 75 76 77 78 74 79 void luoKentta() 75 80 { … … 83 88 ruudut['o'] = lisaaPyoreataso; 84 89 ruudut['i'] = seina; 90 ruudut['#'] = taso; 91 ruudut['-'] = lisaaTasoend; 92 ruudut['&' ]= tasoend; 93 ruudut[','] = piikit; 94 ruudut['M'] = makkara; 95 85 96 86 97 const int ruudunLeveys = 50; … … 89 100 ruudut.Insert(ruudunLeveys, ruudunKorkeus); 90 101 Level.CreateBorders(); 91 } 102 aloituspaikka = pelaaja1.Position; 103 AddCollisionHandler(pelaaja1, Kasittelepelaaja1Tormays); 104 105 } 106 107 PhysicsObject makkara() 108 { 109 PhysicsObject taso = PhysicsObject.CreateStaticObject(50.0, 50.0); 110 taso.Color = Color.Orange; 111 taso.Image = LoadImage("Makkara"); 112 Add(taso); 113 114 return taso; 115 } 116 117 118 PhysicsObject piikit() 119 { 120 PhysicsObject taso = PhysicsObject.CreateStaticObject(50.0, 50.0); 121 taso.Tag = "piikit"; 122 taso.Color = Color.Orange; 123 taso.Image = LoadImage("piikit"); 124 Add(taso); 125 126 return taso; 127 } 128 129 PhysicsObject tasoend() 130 { 131 PhysicsObject taso = PhysicsObject.CreateStaticObject(50.0, 50.0); 132 taso.Color = Color.Orange; 133 taso.Image = LoadImage("maaend"); 134 Add(taso); 135 136 return taso; 137 } 138 139 140 141 142 PhysicsObject lisaaTasoend() 143 { 144 PhysicsObject taso = PhysicsObject.CreateStaticObject(50.0, 50.0); 145 taso.Color = Color.Orange; 146 taso.Image = LoadImage("lattiaend"); 147 Add(taso); 148 149 return taso; 150 } 151 152 PhysicsObject taso () 153 { 154 PhysicsObject taso = PhysicsObject.CreateStaticObject(50.0,50.0); 155 taso.Color = Color.Orange; 156 taso.Image = LoadImage("maa"); 157 Add(taso); 158 159 return taso; 160 } 161 92 162 93 163 … … 114 184 { 115 185 pelaaja1 = new PlatformCharacter(40, 60); 116 pelaaja1.Mass = 8.0;186 pelaaja1.Mass = 10.0; 117 187 pelaaja1.Image = LoadImage("Bulla"); 118 188 … … 129 199 { 130 200 PhysicsObject seina = PhysicsObject.CreateStaticObject(50.0, 50.0); 131 seina.Color = Color. Orange;201 seina.Color = Color.Gray; 132 202 Add(seina); 203 seina.Image = LoadImage("seina"); 133 204 134 205 return seina; … … 199 270 } 200 271 201 272 void Kasittelepelaaja1Tormays(PhysicsObject pelaaja1, PhysicsObject kohde) 273 { 274 if (kohde.Tag == "piikit") 275 { 276 pelaaja1.Position = aloituspaikka; 277 278 } 279 } 202 280 203 281 -
2010/24/timisahe/Makkarajahti/kentta1.txt
r898 r907 16 16 i 17 17 i 18 i 19 i * o20 i ========= o o o ======21 i o ===22 i 23 i 24 i 25 i 26 i 27 i 28 i 18 i * 19 i M 20 i-============= o o ======== 21 i&############ ######## 22 i&############ ######## 23 i&############ ######## 24 i&############ ######## 25 i&############,,,,,,,,,,######## 26 i&############################## 27 i&############################## 28 i&############################## 29 29 i 30 30 i
Note: See TracChangeset
for help on using the changeset viewer.