Changeset 5417 for 2014/27


Ignore:
Timestamp:
2014-07-04 11:22:07 (5 years ago)
Author:
arjuhoyl
Message:

viimeinen commit :)

Location:
2014/27/ArttuH
Files:
5 added
15 edited

Legend:

Unmodified
Added
Removed
  • 2014/27/ArttuH/gamefusion/gamefusion/gamefusion/Ohjelma.cs

    r5375 r5417  
    99        { 
    1010#if !DEBUG 
    11             game.IsFullScreen = false; 
     11            game.IsFullScreen = true; 
    1212#endif 
    1313            game.Run(); 
  • 2014/27/ArttuH/gamefusion/gamefusion/gamefusion/gamefusion.cs

    r5401 r5417  
    2222    TileMap kentta; 
    2323 
    24     Image pelaajanKuva = LoadImage("meat_boy"); 
     24    Image pelaajanKuva = LoadImage("steve"); 
    2525    Image coinKuva = LoadImage("coin"); 
    2626    Image zombiekuva = LoadImage("zombie"); 
     
    3030    SoundEffect healling = LoadSoundEffect("heal"); 
    3131    Image healthback = LoadImage("full-health-kit"); 
     32    Image maalikuva = LoadImage("maalikuva"); 
    3233     
    3334 
     
    4748        kentta.SetTileMethod('z', luozombie); 
    4849        kentta.SetTileMethod('h', health); 
     50        kentta.SetTileMethod('m', maali); 
    4951        //kentta.SetTileMethod('p', pelkokuva); 
    5052        kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 
     
    8587        pelaaja1.Weapon.FireRate = 20000000.0; 
    8688        pelaaja1.Weapon.InfiniteAmmo = true; 
     89        pelaaja1.Weapon.X = 25.0; 
     90        pelaaja1.Weapon.Y = 0.0; 
    8791        pelaaja1.CollisionIgnoreGroup = 1; 
    8892        //AddCollisionHandler(pelaaja1, "pelkokuva", luopelkokuva); 
    8993        AddCollisionHandler(pelaaja1, "zombie", damage); 
    9094        AddCollisionHandler(pelaaja1, "back", tormaaHelthbackkiin); 
     95        AddCollisionHandler(pelaaja1, "maali", peli_loppu); 
    9196    } 
    9297 
     
    136141        if (ControllerOne.IsConnected) 
    137142        { 
     143            Mouse.IsCursorVisible = false; 
    138144            ControllerOne.Listen(Button.B, ButtonState.Pressed, ShowControlHelp, "Näytä ohjeet"); 
    139145            ControllerOne.Listen(Button.Back, ButtonState.Pressed,ConfirmExit, "Poistu pelistä"); 
    140146            ControllerOne.ListenAnalog(AnalogControl.LeftStick, 0.1, Liikuta, "Pelaaja liikkuu vasemmalle/oikealle"); 
    141147            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); 
    143149            ControllerOne.Listen(Button.Y, ButtonState.Pressed, HeitaKranaatti, "testaa", pelaaja1); 
    144150            ControllerOne.Listen(Button.RightShoulder,ButtonState.Pressed, cheat_koodi,"hyss"); 
    145151            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"); 
    147154        } 
    148155        else 
     
    157164            Keyboard.Listen(Key.CapsLock,ButtonState.Pressed, cheat_koodi,"hyss"); 
    158165            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"); 
    160168 
    161169        } 
     
    179187 
    180188        Add(alkuvalikko); 
    181  
    182         Mouse.IsCursorVisible = false; 
    183189    } 
    184190 
    185191   void AloitaPeli() 
    186192   { 
     193       ClearAll(); 
    187194       Gravity = new Vector(0, -1000); 
    188195       saaHeittaa = true; 
     
    232239 
    233240   } 
    234    //void luolima() 
     241//void luolima() 
    235242//   { 
    236243//       PhysicsObject Lima = new PhysicsObject(5.0, 5.0); 
     
    343350     } 
    344351 } 
     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 
    345380} 
  • 2014/27/ArttuH/gamefusion/gamefusion/gamefusion/gamefusion.csproj.Debug.cachefile

    r5375 r5417  
    1515Content\full-health-kit.xnb 
    1616Content\heal.xnb 
     17Content\maalikuva.xnb 
     18Content\steve.xnb 
    1719Content\Take a Chance.wma 
    1820Content\Hitman.wma 
  • 2014/27/ArttuH/gamefusion/gamefusion/gamefusion/obj/x86/Debug/ContentPipeline-{8D32B198-99B4-4D01-876D-8DF5708FA618}.xml

    r5375 r5417  
    1818      <Options>None</Options> 
    1919      <Output>C:\MyTemp\ArttuH\gamefusion\gamefusion\gamefusion\bin\x86\Debug\Content\kentta1.xnb</Output> 
    20       <Time>2014-07-03T13:51:45.1655921+03:00</Time> 
     20      <Time>2014-07-04T10:59:55.6147359+03:00</Time> 
    2121    </Item> 
    2222    <Item> 
     
    148148      <Output>C:\MyTemp\ArttuH\gamefusion\gamefusion\gamefusion\bin\x86\Debug\Content\heal.xnb</Output> 
    149149      <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> 
    150168    </Item> 
    151169    <BuildSuccessful>true</BuildSuccessful> 
  • 2014/27/ArttuH/gamefusion/gamefusion/gamefusion/obj/x86/Debug/cachefile-{8D32B198-99B4-4D01-876D-8DF5708FA618}-targetpath.txt

    r5375 r5417  
    1818Content\full-health-kit.xnb 
    1919Content\heal.xnb 
     20Content\maalikuva.xnb 
     21Content\steve.xnb 
  • 2014/27/ArttuH/gamefusion/gamefusion/gamefusion/obj/x86/Debug/gamefusion.csproj.FileListAbsolute.txt

    r5375 r5417  
    2626C:\MyTemp\ArttuH\gamefusion\gamefusion\gamefusion\bin\x86\Debug\Content\full-health-kit.xnb 
    2727C:\MyTemp\ArttuH\gamefusion\gamefusion\gamefusion\bin\x86\Debug\Content\heal.xnb 
     28C:\MyTemp\ArttuH\gamefusion\gamefusion\gamefusion\bin\x86\Debug\Content\maalikuva.xnb 
     29C:\MyTemp\ArttuH\gamefusion\gamefusion\gamefusion\bin\x86\Debug\Content\steve.xnb 
  • 2014/27/ArttuH/gamefusion/gamefusion/gamefusionContent/gamefusionContent.contentproj

    r5372 r5417  
    155155    </Compile> 
    156156  </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> 
    157171  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    158172  <!--  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# 
     6m............................................................................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.