- Timestamp:
- 2010-06-10 11:42:37 (13 years ago)
- Location:
- 2010/23/almiilhi/Tasohyppely2
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
2010/23/almiilhi/Tasohyppely2/Content/Content.contentproj
r638 r664 82 82 </Compile> 83 83 </ItemGroup> 84 <ItemGroup> 85 <Compile Include="Iiivil Zuuru.png"> 86 <Name>Iiivil Zuuru</Name> 87 <Importer>TextureImporter</Importer> 88 <Processor>TextureProcessor</Processor> 89 </Compile> 90 </ItemGroup> 91 <ItemGroup> 92 <Compile Include="Pahis.png"> 93 <Name>Pahis</Name> 94 <Importer>TextureImporter</Importer> 95 <Processor>TextureProcessor</Processor> 96 </Compile> 97 </ItemGroup> 98 <ItemGroup> 99 <Compile Include="käteinen.png"> 100 <Name>käteinen</Name> 101 <Importer>TextureImporter</Importer> 102 <Processor>TextureProcessor</Processor> 103 </Compile> 104 </ItemGroup> 84 105 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 85 106 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
2010/23/almiilhi/Tasohyppely2/Peli.cs
r638 r664 23 23 const int ruudunLeveys = 50; 24 24 const int ruudunKorkeus = 50; 25 25 26 26 27 27 protected override void Begin() 28 28 { 29 29 30 30 kenttaNro = 0; 31 31 Level.Width = 50000; 32 Level.Height = 1 090;32 Level.Height = 1100; 33 33 34 34 // Luodaan pistelaskuri … … 66 66 lisaaNappaimet(); 67 67 Camera.Follow(pelaaja1); 68 68 69 69 } 70 70 … … 73 73 { 74 74 Level.CreateBorders(); 75 Level.Background.CreateGradient(Color. White, Color.Pink);75 Level.Background.CreateGradient(Color.DarkGray, Color.Black); 76 76 77 77 lisaaTaso(-200, -350); … … 82 82 var merkit = new Dictionary<char, ObjectCreator>(); 83 83 merkit['-'] = LuoPalikka; 84 merkit['x'] = LuoPahis; 84 85 char[,] ruudut = Tiles.ReadFromFile("TextFile1.txt"); 85 86 Tiles.Insert(this, ruudut, merkit, ruudunLeveys, ruudunKorkeus); 86 87 87 88 88 89 89 90 … … 96 97 taso.Color = Color.Blue; 97 98 taso.X = -550; 98 taso.Y = 1 99 taso.Y = 1; 99 100 Add(taso); 100 101 } … … 163 164 int edellisenKentanPisteet = pisteLaskuri.Value; 164 165 seuraavaKentta(); 165 166 166 167 MessageDisplay.Add("Pääsit läpi kentän " + kenttaNro + ". Pisteitä: " + edellisenKentanPisteet); 167 168 168 169 169 170 } 170 171 171 172 } 172 173 PhysicsObject LuoPalikka() … … 174 175 PhysicsObject palikka = PhysicsObject.CreateStaticObject(50.0, 50.0); 175 176 palikka.Shape = Shapes.Rectangle; 176 palikka.Color = Color. Gray;177 palikka.Color = Color.Black; 177 178 return palikka; 178 179 179 180 } 180 181 181 182 182 void lisaaPyssy() 183 183 { 184 184 pyssy = new AssaultRifle(20, 5); 185 pelaaja1.Weapon = new AssaultRifle( 20, 5);185 pelaaja1.Weapon = new AssaultRifle(20, 5); 186 186 187 187 pyssy.Ammo.Value = 500; … … 192 192 193 193 } 194 194 195 196 197 198 PhysicsObject LuoPahis() 199 { 200 PhysicsObject Pahis = new PhysicsObject(40, 20); 201 Pahis. Mass =40.0; 202 return (Pahis); 203 204 } 195 205 } 196 206 } -
2010/23/almiilhi/Tasohyppely2/TextFile1.txt
r604 r664 2 2 3 3 4 4 0 0 0 5 5 -------- 6 6 xx xx 7 7 ------- 8 9 ----- 8 Z 9 ----- x x x x x 10 10 - -------------------------------------- 11 11 --- 12 12 xxxxx 13 13 ----------- 14 14 x x 15 15 -------- 16 16 x 17 17 ------------ 18 18 x x 19 19 -------- 20 20 x 21 21 --------------- 22 22 x x 23 23 - - -------- 24 25 ------ 26 27 28 --------------------------------------------------------------------------------------- 24 x x 25 ------ x x 26 1 2 27 28 ---------------------------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.