- Timestamp:
- 2010-07-09 13:06:03 (11 years ago)
- Location:
- 2010/27/attakorh/Pallerot
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
2010/27/attakorh/Pallerot/Content/Content.contentproj
r1201 r1233 59 59 <Importer>TextureImporter</Importer> 60 60 <Processor>TextureProcessor</Processor> 61 <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 61 62 </Compile> 62 63 </ItemGroup> … … 66 67 <Importer>TextureImporter</Importer> 67 68 <Processor>TextureProcessor</Processor> 69 <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 68 70 </Compile> 69 71 </ItemGroup> … … 73 75 <Importer>TextureImporter</Importer> 74 76 <Processor>TextureProcessor</Processor> 77 <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 75 78 </Compile> 76 79 </ItemGroup> … … 78 81 <Compile Include="laatta1.png"> 79 82 <Name>laatta1</Name> 83 <Importer>TextureImporter</Importer> 84 <Processor>TextureProcessor</Processor> 85 <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 86 </Compile> 87 </ItemGroup> 88 <ItemGroup> 89 <Compile Include="platform1.png"> 90 <Name>platform1</Name> 91 <Importer>TextureImporter</Importer> 92 <Processor>TextureProcessor</Processor> 93 </Compile> 94 </ItemGroup> 95 <ItemGroup> 96 <Compile Include="metalbox.png"> 97 <Name>metalbox</Name> 98 <Importer>TextureImporter</Importer> 99 <Processor>TextureProcessor</Processor> 100 </Compile> 101 </ItemGroup> 102 <ItemGroup> 103 <Compile Include="dyny1.png"> 104 <Name>dyny1</Name> 105 <Importer>TextureImporter</Importer> 106 <Processor>TextureProcessor</Processor> 107 </Compile> 108 </ItemGroup> 109 <ItemGroup> 110 <Compile Include="backg.png"> 111 <Name>backg</Name> 112 <Importer>TextureImporter</Importer> 113 <Processor>TextureProcessor</Processor> 114 </Compile> 115 </ItemGroup> 116 <ItemGroup> 117 <Compile Include="ball1.png"> 118 <Name>ball1</Name> 80 119 <Importer>TextureImporter</Importer> 81 120 <Processor>TextureProcessor</Processor> -
2010/27/attakorh/Pallerot/Peli.cs
r1201 r1233 4 4 using Jypeli.Assets; 5 5 6 6 /// <summary> 7 /// Tehnyt: Atte Korhonen 8 /// </summary> 7 9 class Tasohyppely : PhysicsGame 8 10 { … … 19 21 20 22 21 22 23 protected override void Begin() 23 24 { 24 25 kenttaNro = 0; 25 Level.Width = 2000;26 Level.Width = 10000; 26 27 Level.Height = 1000; 27 28 … … 32 33 33 34 seuraavaKentta(); 34 MessageDisplay.Add("Hypi tornin päälle!"); 35 MessageDisplay.Add("Avaa ohjeet painamalla F1."); 36 Level.Background.CreateGradient(Color.White, Color.DarkGray); 37 38 35 MessageDisplay.Add("Kerää omenat takaisin!"); 36 MessageDisplay.Add("Avaa ohjeet painamalla F1/ Y."); 37 Level.Background.CreateGradient(Color.Black, Color.DarkGray); 39 38 } 40 39 … … 42 41 { 43 42 ClearAll(); 44 45 kenttaNro += 1; // lisätään kenttänumeroa yhdellä46 MessageDisplay.Add("Kenttä " + kenttaNro);47 48 49 50 43 luoKentta(); 51 44 lisaaNappaimet(); … … 65 58 ruudut['p'] = LuoPiikki; 66 59 ruudut['l'] = Laatta; 60 ruudut['m'] = LuoMaali; 61 ruudut['c'] = Platform; 62 ruudut['b'] = Boxi; 67 63 68 64 ruudut.Insert(ruudunLeveys, ruudunKorkeus); … … 90 86 } 91 87 92 void lisaaMaali() 93 { 94 PhysicsObject maali = PhysicsObject.CreateStaticObject(50, 50, Shapes.Circle); 95 maali.Tag = "maali"; 96 maali.IgnoresCollisionResponse = true; 97 maali.X = Level.Left; 98 maali.Y = 500; 99 maali.Image = LoadImage("maali"); 100 Add(maali); 101 } 88 102 89 103 90 void lisaaNappaimet() … … 120 107 controller.Listen(Button.DPadRight, ButtonState.Down, liikuta, "Pelaaja liikkuu oikealle", pelaaja1, nopeus); 121 108 controller.Listen(Button.A, ButtonState.Pressed, hyppaa, "Pelaaja hyppää", pelaaja1, hyppyVoima); 109 controller.Listen(Button.Y, ButtonState.Pressed, ShowControlHelp, "Naytä ohjeet"); 122 110 } 111 123 112 124 113 void liikuta(PlatformCharacter hahmo, double nopeus) … … 152 141 if (kohde.Tag.ToString() == "maali") 153 142 { 154 seuraavaKentta(); 155 MessageDisplay.Add("Jees! Pääsit läpi kentän " + kenttaNro ); 156 ControllerOne.Vibrate(2.5, 0.9, 4.0, 1.0, 5.9); 143 Exit(); 157 144 } 158 145 … … 164 151 MessageDisplay.Add("Kenttä " + kenttaNro); 165 152 MessageDisplay.Add("Kuolit! Aloita alusta!"); 166 MessageDisplay.Add("Avaa ohjeet painamalla F1 .");167 Level.Background.CreateGradient(Color. White, Color.DarkGray);168 ControllerOne.Vibrate(2.5, 0.9, 4.0, 1.0, 1.5);153 MessageDisplay.Add("Avaa ohjeet painamalla F1/ Y."); 154 Level.Background.CreateGradient(Color.Black, Color.DarkGray); 155 ControllerOne.Vibrate(2.5, 4.9, 4.0, 7.0, 1.5); 169 156 170 157 } 158 171 159 } 172 160 … … 177 165 return laatta; 178 166 } 179 167 168 169 PhysicsObject LuoMaali() 170 { 171 PhysicsObject maali = new PhysicsObject(50.0, 50.0); 172 maali.Image = LoadImage("maali"); 173 maali.Tag = "maali"; 174 return (PhysicsObject)maali; 175 } 176 177 PhysicsObject Platform() 178 { 179 PhysicsObject platform = PhysicsObject.CreateStaticObject(ruudunLeveys, ruudunKorkeus); 180 platform.Image = LoadImage("platform1"); 181 return platform; 182 } 183 184 PhysicsObject Boxi() 185 { 186 PhysicsObject boxi = new PhysicsObject (50.0, 50.0); 187 boxi.Image = LoadImage("metalbox"); 188 boxi.Tag = "mbox"; 189 return (PhysicsObject) boxi; 190 } 191 192 void BoxiTyonto(PhysicsObject lisaaPelaaja, PhysicsObject kohde) 193 { 194 } 195 180 196 181 197 } -
2010/27/attakorh/Pallerot/kentta1.txt
r1201 r1233 1 s=================================s 2 s s s 3 s s s 4 s s s 5 s s s 6 spppppps s 7 s======s==========================s 8 s s s 9 s s ========================s 10 s = s 11 s ls= s 12 sl s s 13 s s s 14 sl s = = = s 15 s s p p = s 16 sl s s s p p p s 17 s s s = = = s 18 s = === s s == s 19 spppppppppsps 1 ppppppppppppppps 20 s=================================s 1 s=================================s 2 s s s 3 s s s 4 s s s 5 s s s 6 spppppps = = = = = s 7 s======s pppppppppppppppppp scccccc 8 s s ==================== s 9 s s = ===scc s 10 s = s s s 11 s ls= s s s 12 sl s s s s 13 s s s s ss 14 sl s = = = s s scccccccccccccccccccccccccccccccccccs 15 s s p p == s s ss m bb s 16 sl s s s p p p s s ssccccccccccccccc cccccccs s 17 s s s = = = s s ssc spps sl l s 18 s = === s s === s s sc cccc sccc s s 19 spppppppppsps 1 ppppppppppppppps s bbb b s ls 20 s=================================s cccccccc cccccccccc c s 21 spppppps ccc cc c c s 22 cccccccc spppppppppppppps 23 ===============s
Note: See TracChangeset
for help on using the changeset viewer.