Changeset 5624
- Timestamp:
- 2014-07-24 11:21:46 (9 years ago)
- Location:
- 2014/30/LauriR/tesohyppelytestaus
- Files:
-
- 3 added
- 1 deleted
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
2014/30/LauriR/tesohyppelytestaus/tesohyppelytestaus/tesohyppelytestaus/obj/x86/Debug/ContentPipeline-{D6EAC6A9-8675-4ACB-8A67-C6CE954765FB}.xml
r5591 r5624 36 36 <Options>None</Options> 37 37 <Output>C:\MyTemp\LauriR\tesohyppelytestaus\tesohyppelytestaus\tesohyppelytestaus\bin\x86\Debug\Content\kentta1.xnb</Output> 38 <Time>2014-07-2 3T14:30:13.3325482+03:00</Time>38 <Time>2014-07-24T11:20:02.9261419+03:00</Time> 39 39 </Item> 40 40 <Item> … … 147 147 </Item> 148 148 <Item> 149 <Source>spikes. jpg</Source>149 <Source>spikes.png</Source> 150 150 <Name>spikes</Name> 151 151 <Importer>TextureImporter</Importer> … … 153 153 <Options>None</Options> 154 154 <Output>C:\MyTemp\LauriR\tesohyppelytestaus\tesohyppelytestaus\tesohyppelytestaus\bin\x86\Debug\Content\spikes.xnb</Output> 155 <Time>2014-07-23T14:24:28.1610345+03:00</Time> 155 <Time>2014-07-24T10:24:58.1196943+03:00</Time> 156 </Item> 157 <Item> 158 <Source>piikit2.jpg</Source> 159 <Name>piikit2</Name> 160 <Importer>TextureImporter</Importer> 161 <Processor>TextureProcessor</Processor> 162 <Options>None</Options> 163 <Output>C:\MyTemp\LauriR\tesohyppelytestaus\tesohyppelytestaus\tesohyppelytestaus\bin\x86\Debug\Content\piikit2.xnb</Output> 164 <Time>2014-07-24T10:25:44.6853504+03:00</Time> 156 165 </Item> 157 166 <BuildSuccessful>true</BuildSuccessful> -
2014/30/LauriR/tesohyppelytestaus/tesohyppelytestaus/tesohyppelytestaus/obj/x86/Debug/cachefile-{D6EAC6A9-8675-4ACB-8A67-C6CE954765FB}-targetpath.txt
r5591 r5624 16 16 Content\sieni.xnb 17 17 Content\spikes.xnb 18 Content\piikit2.xnb -
2014/30/LauriR/tesohyppelytestaus/tesohyppelytestaus/tesohyppelytestaus/obj/x86/Debug/tesohyppelytestaus.csproj.FileListAbsolute.txt
r5591 r5624 24 24 C:\MyTemp\LauriR\tesohyppelytestaus\tesohyppelytestaus\tesohyppelytestaus\bin\x86\Debug\Content\sienii.xnb 25 25 C:\MyTemp\LauriR\tesohyppelytestaus\tesohyppelytestaus\tesohyppelytestaus\bin\x86\Debug\Content\spikes.xnb 26 C:\MyTemp\LauriR\tesohyppelytestaus\tesohyppelytestaus\tesohyppelytestaus\bin\x86\Debug\Content\piikit2.xnb -
2014/30/LauriR/tesohyppelytestaus/tesohyppelytestaus/tesohyppelytestaus/tesohyppelytestaus.cs
r5591 r5624 9 9 public class tesohyppelytestaus : PhysicsGame 10 10 { 11 11 12 const double nopeus = 200; 12 13 const double hyppyNopeus = 750; … … 20 21 Image Kissa = LoadImage("kissa"); 21 22 Image Piikit = LoadImage("spikes"); 23 Image taustaKuva = LoadImage("doge"); 24 Image Piikit2 = LoadImage("piikit2"); 22 25 23 26 Image[] juoksukuvat = LoadImages("kuva7", "kuva6", "kuva5", "kuva4", "kuva3", "kuva2", "kuva1"); … … 28 31 SoundEffect maaliAani = LoadSoundEffect("maali"); 29 32 33 30 34 31 35 32 36 public override void Begin() 33 37 { 38 IsFullScreen = true; 39 34 40 Gravity = new Vector(0, -1000); 35 41 … … 51 57 kentta.SetTileMethod('K', LisaaKissa); 52 58 kentta.SetTileMethod('P', LisaaPiikit); 59 kentta.SetTileMethod('V',LisaaPiikit2); 53 60 kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 54 61 Level.CreateBorders(); 55 Level.Background.CreateGradient(Color.White, Color.SkyBlue); 62 Level.Background.Image = taustaKuva; 63 Level.Background.FitToLevel(); 56 64 } 57 65 … … 60 68 PhysicsObject taso = PhysicsObject.CreateStaticObject(leveys, korkeus); 61 69 taso.Position = paikka; 62 taso.Color = Color. ForestGreen;70 taso.Color = Color.Black; 63 71 Add(taso); 64 72 } … … 95 103 { 96 104 Keyboard.Listen(Key.F1, ButtonState.Pressed, ShowControlHelp, "Näytä ohjeet"); 97 Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 105 Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 98 106 99 107 Keyboard.Listen(Key.Left, ButtonState.Down, Liikuta, "Liikkuu vasemmalle", pelaaja1, -nopeus); … … 155 163 kissa.Tag = "kissa"; 156 164 Add(kissa); 165 166 167 168 157 169 } 158 170 … … 160 172 { 161 173 maaliAani.Play(); 162 MessageDisplay.Add("oisuit kissaan ");174 MessageDisplay.Add("oisuit kissaan hävisit pelin"); 163 175 hahmo.Destroy(); 164 176 } … … 182 194 } 183 195 196 void LisaaPiikit2(Vector paikka, double leveys, double korkeus) 197 { 198 PhysicsObject piikit2 = PhysicsObject.CreateStaticObject(leveys * 1.0, korkeus * 1.0); 199 piikit2.IgnoresCollisionResponse = true; 200 piikit2.Position = paikka; 201 piikit2.Image = Piikit2; 202 piikit2.Tag = "piikit2"; 203 Add(piikit2); 204 } 205 206 IntMeter pisteLaskuri; 207 208 void LuoPistelaskuri() 209 { 210 pisteLaskuri = new IntMeter(0); 211 212 Label pisteNaytto = new Label(); 213 pisteNaytto.X = Screen.Left + 100; 214 pisteNaytto.Y = Screen.Top - 100; 215 pisteNaytto.TextColor = Color.Black; 216 pisteNaytto.Color = Color.White; 217 218 pisteNaytto.BindTo(pisteLaskuri); 219 Add(pisteNaytto); 220 } 221 222 184 223 } -
2014/30/LauriR/tesohyppelytestaus/tesohyppelytestaus/tesohyppelytestaus/tesohyppelytestaus.csproj.Debug.cachefile
r5591 r5624 16 16 Content\sieni.xnb 17 17 Content\spikes.xnb 18 Content\piikit2.xnb -
2014/30/LauriR/tesohyppelytestaus/tesohyppelytestaus/tesohyppelytestausContent/kentta1.txt
r5591 r5624 1 * 2 ## 1 2 3 4 5 6 7 ## ## ## ## ## ## ## 8 9 N K 10 ## ## ## ## ## ## ## ## 3 11 4 * *5 ## ##6 12 7 * * 8 ## ## ## 9 10 * * * * 11 ## ## ## ## 12 13 * * * * 14 ## ## ## ## ## ## ## ## ## ##### ## ##### ## ## # ## 15 16 N S K PPPPPPPPPPPPPPPPPPPPPPP 17 ############################################################### 13 P # PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP 14 # ######################################### 15 # # 16 P # P# # 17 # ## # 18 # # 19 P # P# # 20 # ## # 21 # # 22 P # P# # 23 # ## # 24 # # 25 P # P# # 26 # # # # 27 #* * # * * # 28 ### ## ### # 29 # # # 30 # S # # 31 #####################################PPPPPPPPP PPPPPPPPPP PPPPPPPP -
2014/30/LauriR/tesohyppelytestaus/tesohyppelytestaus/tesohyppelytestausContent/tesohyppelytestausContent.contentproj
r5591 r5624 154 154 </ItemGroup> 155 155 <ItemGroup> 156 <Compile Include="spikes. jpg">156 <Compile Include="spikes.png"> 157 157 <Name>spikes</Name> 158 <Importer>TextureImporter</Importer> 159 <Processor>TextureProcessor</Processor> 160 </Compile> 161 </ItemGroup> 162 <ItemGroup> 163 <Compile Include="piikit2.jpg"> 164 <Name>piikit2</Name> 158 165 <Importer>TextureImporter</Importer> 159 166 <Processor>TextureProcessor</Processor>
Note: See TracChangeset
for help on using the changeset viewer.