Changeset 7149


Ignore:
Timestamp:
2016-04-16 14:58:37 (7 years ago)
Author:
sieerinn
Message:
 
Location:
2015/koodauskerho/AarreP
Files:
15 added
14 edited

Legend:

Unmodified
Added
Removed
  • 2015/koodauskerho/AarreP/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1.cs

    r7131 r7149  
    1717    Image pelaajanKuva = LoadImage("originalhahmo"); 
    1818    Image tahtiKuva = LoadImage("sydansydan"); 
    19     Image vihuKuva = LoadImage("vihu"); 
    20  
     19    Image vihuKuva = LoadImage("originalvihu"); 
     20    Image KuolemaKuva = LoadImage("kuolema"); 
     21    Image AmpujaKuva = LoadImage("ampujahahmo"); 
    2122    Image[] animaatioKuvat = LoadImages("originalhahmo", "hahmosydan","hahmosyosydan"); 
    2223 
     
    3334        Camera.ZoomFactor = 1.2; 
    3435        Camera.StayInLevel = true; 
     36 
     37        MediaPlayer.Play("musa"); 
     38        MediaPlayer.IsRepeating = true; 
    3539    } 
    3640 
     
    6771    void LisaaPelaaja(Vector paikka, double leveys, double korkeus) 
    6872    { 
    69         pelaaja1 = new PlatformCharacter(70, 70); 
     73        pelaaja1 = new PlatformCharacter(30, 70); 
    7074        pelaaja1.Position = paikka; 
    7175        pelaaja1.Mass = 9.0; 
    7276        pelaaja1.Image = pelaajanKuva; 
    7377        AddCollisionHandler(pelaaja1, "tahti", TormaaTahteen); 
     78        AddCollisionHandler(pelaaja1, "vihu", TormaaVihuun); 
     79 
    7480        Add(pelaaja1); 
    7581    } 
    7682    void LisaaVihu(Vector paikka, double leveys, double korkeus) 
    7783    { 
    78         pelaaja1 = new PlatformCharacter(70, 70); 
    79         pelaaja1.Position = paikka; 
    80         pelaaja1.Mass = 9.0; 
    81         pelaaja1.Image = pelaajanKuva; 
    82         AddCollisionHandler(pelaaja1, "vihu", TormaaTahteen); 
    83         Add(pelaaja1); 
     84        PlatformCharacter vihu = new PlatformCharacter(50, 70); 
     85        vihu.Position = paikka; 
     86        vihu.Mass = 9.0; 
     87        vihu.Image = vihuKuva; 
     88        vihu.Tag = "vihu"; 
     89        Add(vihu); 
    8490    } 
    8591 
     
    9298        Keyboard.Listen(Key.Right, ButtonState.Down, Liikuta, "Liikkuu vasemmalle", pelaaja1, nopeus); 
    9399        Keyboard.Listen(Key.Up, ButtonState.Pressed, Hyppaa, "Pelaaja hyppää", pelaaja1, hyppyNopeus); 
     100     
    94101 
    95102        ControllerOne.Listen(Button.Back, ButtonState.Pressed, Exit, "Poistu pelistä"); 
     
    122129        pelaaja1.PlayAnimation(animaatio); 
    123130    } 
     131    void AmpuuVihun(PhysicsObject ampujahahmo, PhysicsObject vihu) 
     132    { 
     133        maaliAani.Play(); 
     134        MessageDisplay.Add("ammuit vihun"); 
     135        vihu.Destroy(); 
     136 
     137        Animation animaatio = new Animation(animaatioKuvat); 
     138        animaatio.FPS = 2; 
     139        pelaaja1.PlayAnimation(animaatio); 
     140    } 
    124141    void TormaaVihuun(PhysicsObject hahmo, PhysicsObject vihu) 
    125142    { 
     
    127144        MessageDisplay.Add("kuolit :("); 
    128145        hahmo.Destroy(); 
     146 
     147        PhysicsObject kuva = PhysicsObject.CreateStaticObject(500, 500); 
     148        kuva.Position = hahmo.Position; 
     149        kuva.Image = KuolemaKuva; 
     150        Add(kuva); 
    129151    } 
    130152} 
  • 2015/koodauskerho/AarreP/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1.csproj.Debug.cachefile

    r7131 r7149  
    22Content\norsu.xnb 
    33Content\tahti.xnb 
    4 Content\kentta1.xnb 
    54Content\sydansydan.xnb 
    65Content\originalhahmo.xnb 
     
    87Content\hahmosydan.xnb 
    98Content\vihu.xnb 
     9Content\kentta1.xnb 
     10Content\originalvihu.xnb 
     11Content\kuolema.xnb 
     12Content\musa.xnb 
     13Content\ampujahahmo.xnb 
     14Content\musa.wma 
  • 2015/koodauskerho/AarreP/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1/obj/x86/Debug/ContentPipeline-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}.xml

    r7131 r7149  
    99      <Options>None</Options> 
    1010      <Output>C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\maali.xnb</Output> 
    11       <Time>2016-03-12T10:40:41.472148+02:00</Time> 
     11      <Time>2016-04-16T10:21:37.100332+03:00</Time> 
    1212    </Item> 
    1313    <Item> 
     
    1818      <Options>None</Options> 
    1919      <Output>C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\norsu.xnb</Output> 
    20       <Time>2016-03-12T10:40:41.4731481+02:00</Time> 
     20      <Time>2016-04-16T10:21:37.163332+03:00</Time> 
    2121    </Item> 
    2222    <Item> 
     
    2727      <Options>None</Options> 
    2828      <Output>C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\tahti.xnb</Output> 
    29       <Time>2016-03-12T10:40:41.4741482+02:00</Time> 
     29      <Time>2016-04-16T10:21:37.245332+03:00</Time> 
     30    </Item> 
     31    <Item> 
     32      <Source>sydansydan.png</Source> 
     33      <Name>sydansydan</Name> 
     34      <Importer>TextureImporter</Importer> 
     35      <Processor>TextureProcessor</Processor> 
     36      <Options>None</Options> 
     37      <Output>C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\sydansydan.xnb</Output> 
     38      <Time>2016-04-16T10:21:37.104332+03:00</Time> 
     39    </Item> 
     40    <Item> 
     41      <Source>originalhahmo.png</Source> 
     42      <Name>originalhahmo</Name> 
     43      <Importer>TextureImporter</Importer> 
     44      <Processor>TextureProcessor</Processor> 
     45      <Options>None</Options> 
     46      <Output>C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\originalhahmo.xnb</Output> 
     47      <Time>2016-04-16T10:21:37.109332+03:00</Time> 
     48    </Item> 
     49    <Item> 
     50      <Source>hahmosyosydan.png</Source> 
     51      <Name>hahmosyosydan</Name> 
     52      <Importer>TextureImporter</Importer> 
     53      <Processor>TextureProcessor</Processor> 
     54      <Options>None</Options> 
     55      <Output>C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\hahmosyosydan.xnb</Output> 
     56      <Time>2016-04-16T10:21:37.159332+03:00</Time> 
     57    </Item> 
     58    <Item> 
     59      <Source>hahmosydan.png</Source> 
     60      <Name>hahmosydan</Name> 
     61      <Importer>TextureImporter</Importer> 
     62      <Processor>TextureProcessor</Processor> 
     63      <Options>None</Options> 
     64      <Output>C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\hahmosydan.xnb</Output> 
     65      <Time>2016-04-16T10:21:37.249332+03:00</Time> 
     66    </Item> 
     67    <Item> 
     68      <Source>vihu.png</Source> 
     69      <Name>vihu</Name> 
     70      <Importer>TextureImporter</Importer> 
     71      <Processor>TextureProcessor</Processor> 
     72      <Options>None</Options> 
     73      <Output>C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\vihu.xnb</Output> 
     74      <Time>2016-04-16T10:34:25.840332+03:00</Time> 
    3075    </Item> 
    3176    <Item> 
     
    3681      <Options>None</Options> 
    3782      <Output>C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\kentta1.xnb</Output> 
    38       <Time>2016-03-12T14:27:22.3415999+02:00</Time> 
     83      <Time>2016-04-16T14:53:21.9058695+03:00</Time> 
    3984    </Item> 
    4085    <Item> 
    41       <Source>sydansydan.png</Source> 
    42       <Name>sydansydan</Name> 
     86      <Source>originalvihu.png</Source> 
     87      <Name>originalvihu</Name> 
    4388      <Importer>TextureImporter</Importer> 
    4489      <Processor>TextureProcessor</Processor> 
    4590      <Options>None</Options> 
    46       <Output>C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\sydansydan.xnb</Output> 
    47       <Time>2016-03-12T13:24:52.6839219+02:00</Time> 
     91      <Output>C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\originalvihu.xnb</Output> 
     92      <Time>2016-04-16T10:57:15.116332+03:00</Time> 
    4893    </Item> 
    4994    <Item> 
    50       <Source>originalhahmo.png</Source> 
    51       <Name>originalhahmo</Name> 
     95      <Source>kuolema.png</Source> 
     96      <Name>kuolema</Name> 
    5297      <Importer>TextureImporter</Importer> 
    5398      <Processor>TextureProcessor</Processor> 
    5499      <Options>None</Options> 
    55       <Output>C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\originalhahmo.xnb</Output> 
    56       <Time>2016-03-12T13:11:45.7491398+02:00</Time> 
     100      <Output>C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\kuolema.xnb</Output> 
     101      <Time>2016-04-16T12:58:54.8090104+03:00</Time> 
    57102    </Item> 
    58103    <Item> 
    59       <Source>hahmosyosydan.png</Source> 
    60       <Name>hahmosyosydan</Name> 
     104      <Source>musa.mp3</Source> 
     105      <Name>musa</Name> 
     106      <Importer>Mp3Importer</Importer> 
     107      <Processor>SongProcessor</Processor> 
     108      <Options>None</Options> 
     109      <Output>C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\musa.xnb</Output> 
     110      <Extra>C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\musa.wma</Extra> 
     111      <Time>2016-04-16T14:03:31.5478636+03:00</Time> 
     112    </Item> 
     113    <Item> 
     114      <Source>ampujahahmo.png</Source> 
     115      <Name>ampujahahmo</Name> 
    61116      <Importer>TextureImporter</Importer> 
    62117      <Processor>TextureProcessor</Processor> 
    63118      <Options>None</Options> 
    64       <Output>C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\hahmosyosydan.xnb</Output> 
    65       <Time>2016-03-12T13:11:48.2139556+02:00</Time> 
    66     </Item> 
    67     <Item> 
    68       <Source>hahmosydan.png</Source> 
    69       <Name>hahmosydan</Name> 
    70       <Importer>TextureImporter</Importer> 
    71       <Processor>TextureProcessor</Processor> 
    72       <Options>None</Options> 
    73       <Output>C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\hahmosydan.xnb</Output> 
    74       <Time>2016-03-12T13:49:20.7800876+02:00</Time> 
    75     </Item> 
    76     <Item> 
    77       <Source>vihu.png</Source> 
    78       <Name>vihu</Name> 
    79       <Importer>TextureImporter</Importer> 
    80       <Processor>TextureProcessor</Processor> 
    81       <Options>None</Options> 
    82       <Output>C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\vihu.xnb</Output> 
    83       <Time>2016-03-12T13:59:15.0918688+02:00</Time> 
     119      <Output>C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\ampujahahmo.xnb</Output> 
     120      <Time>2016-04-16T14:33:45.2722179+03:00</Time> 
    84121    </Item> 
    85122    <BuildSuccessful>true</BuildSuccessful> 
     
    130167      <Assembly> 
    131168        <Key>C:\Windows\Microsoft.Net\assembly\GAC_32\Microsoft.Xna.Framework.Content.Pipeline\v4.0_4.0.0.0__842cf8be1de50553\Microsoft.Xna.Framework.Content.Pipeline.dll</Key> 
    132         <Value>2015-09-16T20:11:40.0406455+03:00</Value> 
     169        <Value>2015-09-16T13:26:51.0674639+03:00</Value> 
    133170      </Assembly> 
    134171    </Assemblies> 
  • 2015/koodauskerho/AarreP/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1/obj/x86/Debug/Tasohyppelypeli1.csproj.FileListAbsolute.txt

    r7131 r7149  
    1616C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\hahmosydan.xnb 
    1717C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\vihu.xnb 
     18C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\originalvihu.xnb 
     19C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\kuolema.xnb 
     20C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\musa.xnb 
     21C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\musa.wma 
     22C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\ampujahahmo.xnb 
  • 2015/koodauskerho/AarreP/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1/obj/x86/Debug/cachefile-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}-targetpath.txt

    r7131 r7149  
    22Content\norsu.xnb 
    33Content\tahti.xnb 
    4 Content\kentta1.xnb 
    54Content\sydansydan.xnb 
    65Content\originalhahmo.xnb 
     
    87Content\hahmosydan.xnb 
    98Content\vihu.xnb 
     9Content\kentta1.xnb 
     10Content\originalvihu.xnb 
     11Content\kuolema.xnb 
     12Content\musa.xnb 
     13Content\musa.wma 
     14Content\ampujahahmo.xnb 
  • 2015/koodauskerho/AarreP/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1Content/Tasohyppelypeli1Content.contentproj

    r7131 r7149  
    102102    </Compile> 
    103103  </ItemGroup> 
     104  <ItemGroup> 
     105    <Compile Include="originalvihu.png"> 
     106      <Name>originalvihu</Name> 
     107      <Importer>TextureImporter</Importer> 
     108      <Processor>TextureProcessor</Processor> 
     109    </Compile> 
     110  </ItemGroup> 
     111  <ItemGroup> 
     112    <Compile Include="kuolema.png"> 
     113      <Name>kuolema</Name> 
     114      <Importer>TextureImporter</Importer> 
     115      <Processor>TextureProcessor</Processor> 
     116    </Compile> 
     117  </ItemGroup> 
     118  <ItemGroup> 
     119    <Compile Include="musa.mp3"> 
     120      <Name>musa</Name> 
     121      <Importer>Mp3Importer</Importer> 
     122      <Processor>SongProcessor</Processor> 
     123    </Compile> 
     124  </ItemGroup> 
     125  <ItemGroup> 
     126    <Compile Include="ampujahahmo.png"> 
     127      <Name>ampujahahmo</Name> 
     128      <Importer>TextureImporter</Importer> 
     129      <Processor>TextureProcessor</Processor> 
     130    </Compile> 
     131  </ItemGroup> 
    104132  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    105133  <!--  To modify your build process, add your task inside one of the targets below and uncomment it.  
  • 2015/koodauskerho/AarreP/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1Content/kentta1.txt

    r7131 r7149  
    1          * 
    2          ## 
    3  
    4        *    * 
    5        ##  ## 
    6  
    7      *        * 
    8      ##  ##  ## 
    9  
    10    *    *  *    *      
    11    ##  ##  ##  ## 
    12  
    13  *    *       *   * 
    14  ##  ##  ##  ##  ## 
    15  
    16         N 
    17 ###################################################################### 
     1         *...................................................................... 
     2         ##..................................................................... 
     3                 ....................................................................... 
     4       *    *................................................................... 
     5       ## N ##.................................................................. 
     6           .......................................vvv............................... 
     7     *        *................................................................. 
     8     ##  ##  ##............................##.########.......................... 
     9         .....................................#.............#....................... 
     10   *    *  *    *   ..................#..............###........................ 
     11   ##  ##  ##  ##..................#..............#...........#................. 
     12   ..................................#.......##................................. 
     13 *    *       *   *....................#........................................ 
     14 ##  ##  ##  ##  ##    *********  ############################################## 
     15 ............................................................................... 
     16        .................................v..v..v................................ 
     17######################################################################.......... 
Note: See TracChangeset for help on using the changeset viewer.