Changeset 6924
- Timestamp:
- 2015-07-22 14:32:03 (8 years ago)
- Location:
- 2015/30/EllenH/OmaPeli
- Files:
-
- 3 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
2015/30/EllenH/OmaPeli/OmaPeli/OmaPeli/OmaPeli.cs
r6909 r6924 9 9 public class OmaPeli : PhysicsGame 10 10 { 11 const double nopeus = 100;11 const double nopeus = 250; 12 12 const double hyppyNopeus = 750; 13 13 const int RUUDUN_KOKO = 40; … … 20 20 SoundEffect maaliAani = LoadSoundEffect("maali"); 21 21 22 Timer kiihtyvyysajastin; 23 22 24 public override void Begin() 25 { 26 Alkuvalikko(); 27 } 28 29 void AloitaKentta() 23 30 { 24 31 ClearAll(); … … 31 38 Camera.ZoomFactor = 1.2; 32 39 Camera.StayInLevel = true; 40 41 kiihtyvyysajastin = new Timer(); 42 kiihtyvyysajastin.Interval = 1; 43 kiihtyvyysajastin.Timeout += Kiihdytys; 44 kiihtyvyysajastin.Start(); 33 45 } 34 46 … … 116 128 Timer.SingleShot(0.5, Begin); 117 129 } 130 131 void Kiihdytys() 132 { 133 if (Gravity.Y < -500) 134 { 135 kiihtyvyysajastin.Stop(); 136 } 137 Gravity = Gravity - new Vector(0, 25); 138 } 139 140 void Alkuvalikko() 141 { 142 MultiSelectWindow alkuValikko = new MultiSelectWindow("Valitse pelihahmo", "Herkko Hemiläinen", "Sateenkaariponi", "Kääpiö", 143 "Poistu"); 144 alkuValikko.AddItemHandler(0, ValitseHerkko); 145 alkuValikko.AddItemHandler(1, ValitseESPoni); 146 alkuValikko.AddItemHandler(2, ValitseKaapio); 147 alkuValikko.AddItemHandler(3, Exit); 148 alkuValikko.DefaultCancel = 3; 149 Add(alkuValikko); 150 } 151 152 void ValitseHerkko() 153 { 154 pelaajanKuva = LoadImage("herkko"); 155 AloitaKentta(); 156 } 157 158 void ValitseESPoni() 159 { 160 pelaajanKuva = LoadImage("esponi"); 161 AloitaKentta(); 162 } 163 164 void ValitseKaapio() 165 { 166 pelaajanKuva = LoadImage("kaapio"); 167 AloitaKentta(); 168 } 118 169 } -
2015/30/EllenH/OmaPeli/OmaPeli/OmaPeli/OmaPeli.csproj.Debug.cachefile
r6909 r6924 6 6 Content\esponi.xnb 7 7 Content\es.xnb 8 Content\kaapio.xnb -
2015/30/EllenH/OmaPeli/OmaPeli/OmaPeli/obj/x86/Debug/OmaPeli.csproj.FileListAbsolute.txt
r6909 r6924 14 14 C:\MyTemp\EllenH\OmaPeli\OmaPeli\OmaPeli\bin\x86\Debug\Content\esponi.xnb 15 15 C:\MyTemp\EllenH\OmaPeli\OmaPeli\OmaPeli\bin\x86\Debug\Content\es.xnb 16 C:\MyTemp\EllenH\OmaPeli\OmaPeli\OmaPeli\bin\x86\Debug\Content\kaapio.xnb -
2015/30/EllenH/OmaPeli/OmaPeli/OmaPeli/obj/x86/Debug/cachefile-{128CCA7D-2017-4F3A-B4A1-A70BDF9EB76C}-targetpath.txt
r6909 r6924 6 6 Content\esponi.xnb 7 7 Content\es.xnb 8 Content\kaapio.xnb -
2015/30/EllenH/OmaPeli/OmaPeli/OmaPeliContent/OmaPeliContent.contentproj
r6909 r6924 88 88 </Compile> 89 89 </ItemGroup> 90 <ItemGroup> 91 <Compile Include="kaapio.png"> 92 <Name>kaapio</Name> 93 <Importer>TextureImporter</Importer> 94 <Processor>TextureProcessor</Processor> 95 </Compile> 96 </ItemGroup> 90 97 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 91 98 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
2015/30/EllenH/OmaPeli/OmaPeli/OmaPeliContent/kentta1.txt
r6909 r6924 112 112 ...............*............ 113 113 ................*........... 114 ............... .............115 .............. ..............116 .............. ..............117 ............. ...............114 ...............*............ 115 ..............**.####....... 116 ..............**............ 117 .............****........... 118 118 ............................ 119 119 ............................ -
2015/30/EllenH/OmaPeli/OmaPeli/OmaPeliContent/obj/x86/Debug/ContentPipeline.xml
r6909 r6924 36 36 <Options>None</Options> 37 37 <Output>C:\MyTemp\EllenH\OmaPeli\OmaPeli\OmaPeli\bin\x86\Debug\Content\kentta1.xnb</Output> 38 <Time>2015-07-22T1 1:45:41.1387073+03:00</Time>38 <Time>2015-07-22T12:41:11.7636181+03:00</Time> 39 39 </Item> 40 40 <Item> … … 64 64 <Output>C:\MyTemp\EllenH\OmaPeli\OmaPeli\OmaPeli\bin\x86\Debug\Content\es.xnb</Output> 65 65 <Time>2015-07-22T11:30:53.0268301+03:00</Time> 66 </Item> 67 <Item> 68 <Source>kaapio.png</Source> 69 <Name>kaapio</Name> 70 <Importer>TextureImporter</Importer> 71 <Processor>TextureProcessor</Processor> 72 <Options>None</Options> 73 <Output>C:\MyTemp\EllenH\OmaPeli\OmaPeli\OmaPeli\bin\x86\Debug\Content\kaapio.xnb</Output> 74 <Time>2015-07-22T14:21:21.1102347+03:00</Time> 66 75 </Item> 67 76 <BuildSuccessful>true</BuildSuccessful>
Note: See TracChangeset
for help on using the changeset viewer.