- Timestamp:
- 2014-07-04 11:22:07 (7 years ago)
- Location:
- 2014/27/ArttuH
- Files:
-
- 5 added
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
2014/27/ArttuH/gamefusion/gamefusion/gamefusion/Ohjelma.cs
r5375 r5417 9 9 { 10 10 #if !DEBUG 11 game.IsFullScreen = false;11 game.IsFullScreen = true; 12 12 #endif 13 13 game.Run(); -
2014/27/ArttuH/gamefusion/gamefusion/gamefusion/gamefusion.cs
r5401 r5417 22 22 TileMap kentta; 23 23 24 Image pelaajanKuva = LoadImage(" meat_boy");24 Image pelaajanKuva = LoadImage("steve"); 25 25 Image coinKuva = LoadImage("coin"); 26 26 Image zombiekuva = LoadImage("zombie"); … … 30 30 SoundEffect healling = LoadSoundEffect("heal"); 31 31 Image healthback = LoadImage("full-health-kit"); 32 Image maalikuva = LoadImage("maalikuva"); 32 33 33 34 … … 47 48 kentta.SetTileMethod('z', luozombie); 48 49 kentta.SetTileMethod('h', health); 50 kentta.SetTileMethod('m', maali); 49 51 //kentta.SetTileMethod('p', pelkokuva); 50 52 kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); … … 85 87 pelaaja1.Weapon.FireRate = 20000000.0; 86 88 pelaaja1.Weapon.InfiniteAmmo = true; 89 pelaaja1.Weapon.X = 25.0; 90 pelaaja1.Weapon.Y = 0.0; 87 91 pelaaja1.CollisionIgnoreGroup = 1; 88 92 //AddCollisionHandler(pelaaja1, "pelkokuva", luopelkokuva); 89 93 AddCollisionHandler(pelaaja1, "zombie", damage); 90 94 AddCollisionHandler(pelaaja1, "back", tormaaHelthbackkiin); 95 AddCollisionHandler(pelaaja1, "maali", peli_loppu); 91 96 } 92 97 … … 136 141 if (ControllerOne.IsConnected) 137 142 { 143 Mouse.IsCursorVisible = false; 138 144 ControllerOne.Listen(Button.B, ButtonState.Pressed, ShowControlHelp, "Näytä ohjeet"); 139 145 ControllerOne.Listen(Button.Back, ButtonState.Pressed,ConfirmExit, "Poistu pelistä"); 140 146 ControllerOne.ListenAnalog(AnalogControl.LeftStick, 0.1, Liikuta, "Pelaaja liikkuu vasemmalle/oikealle"); 141 147 ControllerOne.Listen(Button.A, ButtonState.Pressed, Hyppaa, "Pelaaja hyppää", pelaaja1, hyppyNopeus); 142 ControllerOne.Listen(Button. X, ButtonState.Pressed, ammuAseella, "ammu", pelaaja1);148 ControllerOne.Listen(Button.LeftTrigger, ButtonState.Pressed, ammuAseella, "ammu", pelaaja1); 143 149 ControllerOne.Listen(Button.Y, ButtonState.Pressed, HeitaKranaatti, "testaa", pelaaja1); 144 150 ControllerOne.Listen(Button.RightShoulder,ButtonState.Pressed, cheat_koodi,"hyss"); 145 151 ControllerOne.Listen(Button.LeftShoulder, ButtonState.Down, HeitaKranaatti_cheat, "testaa", pelaaja1); 146 ControllerOne.Listen(Button.DPadDown, ButtonState.Down, ammuAseella, "ammu", pelaaja1); 152 ControllerOne.Listen(Button.DPadDown, ButtonState.Down, ammuAseella, "hyss", pelaaja1); 153 ControllerOne.ListenAnalog(AnalogControl.RightStick, 0.1, Tahtaa, "Tähtää aseella"); 147 154 } 148 155 else … … 157 164 Keyboard.Listen(Key.CapsLock,ButtonState.Pressed, cheat_koodi,"hyss"); 158 165 Keyboard.Listen(Key.F, ButtonState.Down, HeitaKranaatti_cheat, "testaa", pelaaja1); 159 Keyboard.Listen(Key.Space, ButtonState.Down, ammuAseella, "ammu", pelaaja1); 166 Keyboard.Listen(Key.Space, ButtonState.Down, ammuAseella, "hyss", pelaaja1); 167 Mouse.ListenMovement(0.1, tahtaa_hiiri, "tähtäää aseella"); 160 168 161 169 } … … 179 187 180 188 Add(alkuvalikko); 181 182 Mouse.IsCursorVisible = false;183 189 } 184 190 185 191 void AloitaPeli() 186 192 { 193 ClearAll(); 187 194 Gravity = new Vector(0, -1000); 188 195 saaHeittaa = true; … … 232 239 233 240 } 234 241 //void luolima() 235 242 // { 236 243 // PhysicsObject Lima = new PhysicsObject(5.0, 5.0); … … 343 350 } 344 351 } 352 void Tahtaa(AnalogState tatintila) 353 { 354 pelaaja1.Weapon.Angle = tatintila.StateVector.Angle; 355 } 356 void tahtaa_hiiri(AnalogState hiirenLiike) 357 { 358 Vector suunta = (Mouse.PositionOnWorld - pelaaja1.Weapon.AbsolutePosition).Normalize(); 359 pelaaja1.Weapon.Angle = suunta.Angle; 360 } 361 void maali(Vector paikka, double leveys, double korkeus) 362 { 363 PhysicsObject taso = PhysicsObject.CreateStaticObject(leveys, korkeus); 364 taso.Position = paikka; 365 taso.Image = maalikuva; 366 taso.Tag = "maali"; 367 Add(taso); 368 } 369 void peli_loppu(PhysicsObject pelaaja,PhysicsObject maali) 370 { 371 ClearAll(); 372 MultiSelectWindow loppu = new MultiSelectWindow("jee voitit pelin","lopetapeli"); 373 loppu.AddItemHandler(0, Exit); 374 Add(loppu); 375 376 377 378 } 379 345 380 } -
2014/27/ArttuH/gamefusion/gamefusion/gamefusion/gamefusion.csproj.Debug.cachefile
r5375 r5417 15 15 Content\full-health-kit.xnb 16 16 Content\heal.xnb 17 Content\maalikuva.xnb 18 Content\steve.xnb 17 19 Content\Take a Chance.wma 18 20 Content\Hitman.wma -
2014/27/ArttuH/gamefusion/gamefusion/gamefusion/obj/x86/Debug/ContentPipeline-{8D32B198-99B4-4D01-876D-8DF5708FA618}.xml
r5375 r5417 18 18 <Options>None</Options> 19 19 <Output>C:\MyTemp\ArttuH\gamefusion\gamefusion\gamefusion\bin\x86\Debug\Content\kentta1.xnb</Output> 20 <Time>2014-07-0 3T13:51:45.1655921+03:00</Time>20 <Time>2014-07-04T10:59:55.6147359+03:00</Time> 21 21 </Item> 22 22 <Item> … … 148 148 <Output>C:\MyTemp\ArttuH\gamefusion\gamefusion\gamefusion\bin\x86\Debug\Content\heal.xnb</Output> 149 149 <Time>2014-07-03T13:43:03.9944802+03:00</Time> 150 </Item> 151 <Item> 152 <Source>maalikuva.png</Source> 153 <Name>maalikuva</Name> 154 <Importer>TextureImporter</Importer> 155 <Processor>TextureProcessor</Processor> 156 <Options>None</Options> 157 <Output>C:\MyTemp\ArttuH\gamefusion\gamefusion\gamefusion\bin\x86\Debug\Content\maalikuva.xnb</Output> 158 <Time>2014-07-04T11:07:21.9861131+03:00</Time> 159 </Item> 160 <Item> 161 <Source>steve.png</Source> 162 <Name>steve</Name> 163 <Importer>TextureImporter</Importer> 164 <Processor>TextureProcessor</Processor> 165 <Options>None</Options> 166 <Output>C:\MyTemp\ArttuH\gamefusion\gamefusion\gamefusion\bin\x86\Debug\Content\steve.xnb</Output> 167 <Time>2014-07-04T11:17:53.5637515+03:00</Time> 150 168 </Item> 151 169 <BuildSuccessful>true</BuildSuccessful> -
2014/27/ArttuH/gamefusion/gamefusion/gamefusion/obj/x86/Debug/cachefile-{8D32B198-99B4-4D01-876D-8DF5708FA618}-targetpath.txt
r5375 r5417 18 18 Content\full-health-kit.xnb 19 19 Content\heal.xnb 20 Content\maalikuva.xnb 21 Content\steve.xnb -
2014/27/ArttuH/gamefusion/gamefusion/gamefusion/obj/x86/Debug/gamefusion.csproj.FileListAbsolute.txt
r5375 r5417 26 26 C:\MyTemp\ArttuH\gamefusion\gamefusion\gamefusion\bin\x86\Debug\Content\full-health-kit.xnb 27 27 C:\MyTemp\ArttuH\gamefusion\gamefusion\gamefusion\bin\x86\Debug\Content\heal.xnb 28 C:\MyTemp\ArttuH\gamefusion\gamefusion\gamefusion\bin\x86\Debug\Content\maalikuva.xnb 29 C:\MyTemp\ArttuH\gamefusion\gamefusion\gamefusion\bin\x86\Debug\Content\steve.xnb -
2014/27/ArttuH/gamefusion/gamefusion/gamefusionContent/gamefusionContent.contentproj
r5372 r5417 155 155 </Compile> 156 156 </ItemGroup> 157 <ItemGroup> 158 <Compile Include="maalikuva.png"> 159 <Name>maalikuva</Name> 160 <Importer>TextureImporter</Importer> 161 <Processor>TextureProcessor</Processor> 162 </Compile> 163 </ItemGroup> 164 <ItemGroup> 165 <Compile Include="Steve.png"> 166 <Name>Steve</Name> 167 <Importer>TextureImporter</Importer> 168 <Processor>TextureProcessor</Processor> 169 </Compile> 170 </ItemGroup> 157 171 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 158 172 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
2014/27/ArttuH/gamefusion/gamefusion/gamefusionContent/kentta1.txt
r5372 r5417 1 ............................................................................................zzzzzzzzzzz# 2 ........................z...................z...............................................zzzzzzzzzzz# 3 .................#####################################......................................zzzzzzzzzzz# 4 ................#....................................##.....................................zzzzzzzzzzz# 5 ........N.....#......................................#h.....................................zzzzzzzzzzz# 6 ##############.......................................################################################### 1 .........................................................................................# 2 .........................................................................................# 3 .........................................................................................# 4 .........................................................................................# 5 .............................................................................zzzzzzzzzzzz# 6 m............................................................................zzzzzzzzzzzz# 7 ####################################################################################### ## 8 .............................................................................zzzzzzzzzzzz# 9 ........................z.....z..............................................zzzzzzzzzzz## 10 .................#######################.....................................zzzzzzzzzzzz# 11 ................#......................##....................................zzzzzzzzzzzz# 12 ........N.....#........................#h....................................zzzzzzzzzzzz# 13 ##############.........................###################################################
Note: See TracChangeset
for help on using the changeset viewer.