- Timestamp:
- 2016-06-23 12:41:13 (7 years ago)
- Location:
- 2016/25/SaanaR
- Files:
-
- 98 added
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
2016/25/SaanaR/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1.cs
r7488 r7494 26 26 public override void Begin() 27 27 { 28 IsFullScreen = true; 28 29 LuoAlkuvalikko(); 30 29 31 } 30 32 void LuoAlkuvalikko () … … 39 41 void AloitaPeli () 40 42 { 43 kolikoidenMaara = 0; 41 44 Gravity = new Vector(0, -1000); 45 pisteLaskuri.Value = 0; 42 46 43 47 LuoKentta(); 44 48 LisaaNappaimet(); 49 LuoPistelaskuri(); 45 50 46 51 Camera.Follow(pelaaja1); 47 52 Camera.ZoomFactor = 1.2; 48 53 Camera.StayInLevel = true; 54 } 55 IntMeter pisteLaskuri = new IntMeter(0); 56 57 void LuoPistelaskuri() 58 { 59 60 Label pisteNaytto = new Label(); 61 pisteNaytto.X = Screen.Right - 100; 62 pisteNaytto.Y = Screen.Bottom + 100; 63 pisteNaytto.TextColor = Color.Black; 64 pisteNaytto.Color = Color.White; 65 66 pisteNaytto.BindTo(pisteLaskuri); 67 Add(pisteNaytto); 49 68 } 50 69 void LisaaAse (Vector paikka, double leveys, double korkeus) … … 54 73 ase.Tag = "ase"; 55 74 ase.Image = LoadImage("ase"); 75 ase.CollisionIgnoreGroup = 1; 56 76 Add(ase); 57 77 } … … 80 100 ampiainen.Brain = aivot; 81 101 ampiainen.Tag = "ampiainen"; 102 ampiainen.CollisionIgnoreGroup = 1; 82 103 aivot.Loop = true; 83 104 } … … 105 126 kolikko.Tag = "Piste"; 106 127 kolikoidenMaara++; 128 pisteLaskuri.Value++; 107 129 Add(kolikko); 108 130 } … … 203 225 tahti.Destroy(); 204 226 kolikoidenMaara--; 227 pisteLaskuri.Value--; 205 228 206 229 if (kolikoidenMaara <= 00) SiirrySeuraavaanKenttaan(); … … 210 233 ClearAll(); 211 234 kenttaMenossa++; 212 if (kenttaMenossa >= kentat.Length) LuoAlkuvalikko(); 213 AloitaPeli(); 235 if (kenttaMenossa >= kentat.Length) VoititPelin(); 236 else AloitaPeli(); 237 } 238 void VoititPelin () 239 { 240 Label tekstikentta = new Label("Voitit pelin"); 241 GameObject hymynaama = new GameObject(100, 100); 242 hymynaama.Image = LoadImage("Hymynaama"); 243 tekstikentta.Y += 100; 244 Add(hymynaama); 245 //hymynaama.Y -= 100; 246 Add(tekstikentta); 247 tekstikentta.Size = new Vector(50, 200); 248 tekstikentta.TextureFillsShape = true; 249 tekstikentta.TextScale = new Vector(3, 3); 250 251 GameObject alusta = new GameObject(150, 60); 252 alusta.Image = LoadImage("alusta"); 253 Add(alusta); 254 alusta.Y -= 100; 255 GameObject lopeta = new GameObject(150, 60); 256 lopeta.Image = LoadImage("lopeta"); 257 Add(lopeta); 258 lopeta.Y -= 175; 259 IsMouseVisible = true; 260 Mouse.Listen(MouseButton.Left, ButtonState.Pressed, delegate { 261 if (Mouse.IsCursorOn(alusta)) { ClearAll(); kenttaMenossa = 0; AloitaPeli(); } 262 else if (Mouse.IsCursorOn(lopeta)) ConfirmExit(); 263 },null 264 265 ); 214 266 } 215 267 -
2016/25/SaanaR/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1.csproj
r7472 r7494 19 19 <ApplicationIcon>Game.ico</ApplicationIcon> 20 20 <Thumbnail>GameThumbnail.png</Thumbnail> 21 <PublishUrl>publish\</PublishUrl> 21 <IsWebBootstrapper>false</IsWebBootstrapper> 22 <ReferencePath>$(registry:HKEY_LOCAL_MACHINE\Software\Jypeli@Install_Dir)\lib\x86</ReferencePath> 23 <PublishUrl>C:\Users\ohjelmointi\Documents\SaanaR\Attackofthebee-teamInstall\</PublishUrl> 22 24 <Install>true</Install> 23 25 <InstallFrom>Disk</InstallFrom> … … 31 33 <ApplicationRevision>0</ApplicationRevision> 32 34 <ApplicationVersion>1.0.0.%2a</ApplicationVersion> 33 <IsWebBootstrapper>false</IsWebBootstrapper>34 35 <UseApplicationTrust>false</UseApplicationTrust> 36 <PublishWizardCompleted>true</PublishWizardCompleted> 35 37 <BootstrapperEnabled>true</BootstrapperEnabled> 36 <ReferencePath>$(registry:HKEY_LOCAL_MACHINE\Software\Jypeli@Install_Dir)\lib\x86</ReferencePath>37 38 </PropertyGroup> 38 39 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> … … 60 61 <PlatformTarget>x86</PlatformTarget> 61 62 <XnaCompressContent>true</XnaCompressContent> 63 </PropertyGroup> 64 <PropertyGroup> 65 <ManifestCertificateThumbprint>2C4CFF26EDFB8BD946970D9E0C3B6B1562026137</ManifestCertificateThumbprint> 66 </PropertyGroup> 67 <PropertyGroup> 68 <ManifestKeyFile>Tasohyppelypeli1_TemporaryKey.pfx</ManifestKeyFile> 69 </PropertyGroup> 70 <PropertyGroup> 71 <GenerateManifests>true</GenerateManifests> 72 </PropertyGroup> 73 <PropertyGroup> 74 <SignManifests>true</SignManifests> 62 75 </PropertyGroup> 63 76 <ItemGroup> … … 152 165 </BootstrapperPackage> 153 166 </ItemGroup> 167 <ItemGroup> 168 <None Include="Tasohyppelypeli1_TemporaryKey.pfx" /> 169 </ItemGroup> 154 170 <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> 155 171 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\Microsoft.Xna.GameStudio.targets" /> -
2016/25/SaanaR/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1.csproj.Debug.cachefile
r7487 r7494 15 15 Content\kentta5.xnb 16 16 Content\ase.xnb 17 Content\Hymynaama.xnb 18 Content\alusta.xnb 19 Content\lopeta.xnb -
2016/25/SaanaR/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1/obj/x86/Debug/ContentPipeline-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}.xml
r7487 r7494 99 99 <Options>None</Options> 100 100 <Output>C:\Users\ohjelmointi\Documents\SaanaR\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\kentta2.xnb</Output> 101 <Time>2016-06-2 2T14:40:50.8741176+03:00</Time>101 <Time>2016-06-23T09:57:28.7963375+03:00</Time> 102 102 </Item> 103 103 <Item> … … 145 145 <Output>C:\Users\ohjelmointi\Documents\SaanaR\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\ase.xnb</Output> 146 146 <Time>2016-06-22T15:32:44.421579+03:00</Time> 147 </Item> 148 <Item> 149 <Source>Hymynaama.png</Source> 150 <Name>Hymynaama</Name> 151 <Importer>TextureImporter</Importer> 152 <Processor>TextureProcessor</Processor> 153 <Options>None</Options> 154 <Output>C:\Users\ohjelmointi\Documents\SaanaR\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\Hymynaama.xnb</Output> 155 <Time>2016-06-23T11:21:35.4174337+03:00</Time> 156 </Item> 157 <Item> 158 <Source>alusta.png</Source> 159 <Name>alusta</Name> 160 <Importer>TextureImporter</Importer> 161 <Processor>TextureProcessor</Processor> 162 <Options>None</Options> 163 <Output>C:\Users\ohjelmointi\Documents\SaanaR\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\alusta.xnb</Output> 164 <Time>2016-06-23T11:33:30.3650134+03:00</Time> 165 </Item> 166 <Item> 167 <Source>lopeta.png</Source> 168 <Name>lopeta</Name> 169 <Importer>TextureImporter</Importer> 170 <Processor>TextureProcessor</Processor> 171 <Options>None</Options> 172 <Output>C:\Users\ohjelmointi\Documents\SaanaR\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\lopeta.xnb</Output> 173 <Time>2016-06-23T11:35:12.9703338+03:00</Time> 147 174 </Item> 148 175 <BuildSuccessful>true</BuildSuccessful> -
2016/25/SaanaR/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1/obj/x86/Debug/Tasohyppelypeli1.csproj.FileListAbsolute.txt
r7487 r7494 23 23 C:\Users\ohjelmointi\Documents\SaanaR\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\kentta5.xnb 24 24 C:\Users\ohjelmointi\Documents\SaanaR\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\ase.xnb 25 C:\Users\ohjelmointi\Documents\SaanaR\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\Hymynaama.xnb 26 C:\Users\ohjelmointi\Documents\SaanaR\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\alusta.xnb 27 C:\Users\ohjelmointi\Documents\SaanaR\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\lopeta.xnb -
2016/25/SaanaR/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1/obj/x86/Debug/cachefile-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}-targetpath.txt
r7487 r7494 15 15 Content\kentta5.xnb 16 16 Content\ase.xnb 17 Content\Hymynaama.xnb 18 Content\alusta.xnb 19 Content\lopeta.xnb -
2016/25/SaanaR/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1Content/Tasohyppelypeli1Content.contentproj
r7487 r7494 151 151 </Compile> 152 152 </ItemGroup> 153 <ItemGroup> 154 <Compile Include="Hymynaama.png"> 155 <Name>Hymynaama</Name> 156 <Importer>TextureImporter</Importer> 157 <Processor>TextureProcessor</Processor> 158 </Compile> 159 </ItemGroup> 160 <ItemGroup> 161 <Compile Include="alusta.png"> 162 <Name>alusta</Name> 163 <Importer>TextureImporter</Importer> 164 <Processor>TextureProcessor</Processor> 165 </Compile> 166 </ItemGroup> 167 <ItemGroup> 168 <Compile Include="lopeta.png"> 169 <Name>lopeta</Name> 170 <Importer>TextureImporter</Importer> 171 <Processor>TextureProcessor</Processor> 172 </Compile> 173 </ItemGroup> 153 174 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 154 175 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
2016/25/SaanaR/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1Content/kentta2.txt
r7487 r7494 8 8 ################### # 9 9 10 * 10 ** * * * A 11 11 # # # # # # # # 12 12 13 ** * * * * 13 ** * * * * ** 14 14 ## ## ## ## ## ## 15 15 16 * * * 16 * * * ** * *A 17 17 # ## ## ## ## ## 18 18
Note: See TracChangeset
for help on using the changeset viewer.