Changeset 9206 for 2017


Ignore:
Timestamp:
2017-07-28 11:49:12 (2 years ago)
Author:
npo17_65
Message:

Hyppy toimii

Location:
2017/30/HugoE/HanniAndHoo/HanniAndHoo
Files:
1 added
2 deleted
11 edited

Legend:

Unmodified
Added
Removed
  • 2017/30/HugoE/HanniAndHoo/HanniAndHoo/HanniAndHoo/HanniAndHoo.cs

    r9191 r9206  
    1414    Image taustis2 = LoadImage("Space"); 
    1515 
    16     DoubleMeter elamaLaskuri; 
    17     DoubleMeter elamaLaskuri2; 
    18  
    19      
     16       
    2017    PlasmaCannon HanninAse; 
    2118    Cannon HoonAse; 
     19 
     20    SoundEffect hyppyAani = LoadSoundEffect("jump"); 
    2221 
    2322     
     
    2928    { 
    3029        AlkuValikko(); 
    31         //IsFullScreen = true; 
     30        IsFullScreen = true; 
    3231         
    3332 
     
    7372        AddCollisionHandler(Hoo, Hanni, Tormaa); 
    7473        Hoo.Elamalaskuri.LowerLimit += LoppuValikko; 
    75         Hanni.Elamalaskuri.LowerLimit += LoppuValikko; 
     74        Hanni.Elamalaskuri.LowerLimit += LoppuValikko;         
    7675    } 
    7776 
     
    116115        PeliUkko pu = (PeliUkko)Kohde; 
    117116        pu.Elamalaskuri.AddValue(-1); 
     117        PeliUkko pu2 = (PeliUkko)Tormaaja; 
     118        pu2.Elamalaskuri.AddValue(2); 
     119         
    118120    } 
    119121 
     
    123125        if (!Kohde.Tag.Equals("pelaaja2")) return; 
    124126        PeliUkko pu = (PeliUkko)Kohde; 
     127         
    125128        pu.Elamalaskuri.AddValue(-5); 
     129        if (Ammus.Tag.Equals("PelaajanAmmus")) 
     130        { 
     131           Hanni.Elamalaskuri.AddValue(1); 
     132        } 
     133         
    126134 
    127135    } 
     
    149157    void LuoKentta() 
    150158    { 
    151  
    152159        MediaPlayer.Stop(); 
    153160        MediaPlayer.Volume = 0.2; 
     
    158165        Level.Height = Screen.Height; 
    159166        Level.Background.Image = taustis; 
    160         //Level.Background.ScaleToLevelByHeight(); 
    161167        Level.Background.ScaleToLevelByWidth(); 
    162168        Gravity = new Vector(0.0, -800.0);         
     
    193199        else 
    194200        { 
     201             
    195202            tyyppi.Jump(hypynMaara); 
    196203        } 
     204                
     205        hyppyAani.Play();         
    197206        tyyppi.HyppyLaskuri.AddValue(1); 
    198207       
     
    212221    void AmmuAseella(PlasmaCannon HanninAse) 
    213222    { 
    214         PhysicsObject Ammus = HanninAse.Shoot(); 
     223        PhysicsObject Ammus = HanninAse.Shoot();         
    215224        HanninAse.FireRate = 2.5; 
    216225        if (Ammus != null) 
     
    218227            Ammus.Size *= 3; 
    219228            Ammus.MaximumLifetime = TimeSpan.FromSeconds(2.0); 
     229            Ammus.Tag = "PelaajanAmmus"; 
    220230        } 
    221231    } 
     
    223233    void AmmuAseella2(Cannon HoonAse) 
    224234    { 
    225         PhysicsObject Ammus = HoonAse.Shoot(); 
    226         HoonAse.FireRate = 1; 
    227         if (Ammus != null) 
    228         { 
    229             Ammus.Size *= 4; 
    230             Ammus.MaximumLifetime = TimeSpan.FromSeconds(4.0); 
    231         } 
    232  
    233     } 
    234  
    235  
    236  
    237  
    238  
    239  
     235        PhysicsObject Ammus2 = HoonAse.Shoot(); 
     236        HoonAse.FireRate = 1.5; 
     237        if (Ammus2 != null) 
     238        { 
     239            Ammus2.Size *= 4; 
     240            Ammus2.MaximumLifetime = TimeSpan.FromSeconds(4.0); 
     241            Ammus2.Tag = "Pelaajan2Ammus"; 
     242 
     243        } 
     244 
     245    } 
    240246 
    241247    class PeliUkko : PlatformCharacter 
  • 2017/30/HugoE/HanniAndHoo/HanniAndHoo/HanniAndHoo/HanniAndHoo.csproj.Debug.cachefile

    r9189 r9206  
    33Content\taustakuva.xnb 
    44Content\sky1.xnb 
    5 Content\Moon.xnb 
    65Content\TaistelumusaEhdokas2.xnb 
    7 Content\jump.xnb 
    86Content\Space.xnb 
    97Content\taustamusiikki.xnb 
     8Content\jump.xnb 
    109Content\TaistelumusaEhdokas2.wma 
    11 Content\jump.wma 
    1210Content\taustamusiikki.wma 
  • 2017/30/HugoE/HanniAndHoo/HanniAndHoo/HanniAndHoo/obj/x86/Debug/ContentPipeline-{C15B7F9E-AA60-42F1-A06A-82A8BC818B5D}.xml

    r9189 r9206  
    4949    </Item> 
    5050    <Item> 
    51       <Source>jump.mp3</Source> 
    52       <Name>jump</Name> 
    53       <Importer>Mp3Importer</Importer> 
    54       <Processor>SongProcessor</Processor> 
    55       <Options>None</Options> 
    56       <Output>C:\MyTemp\HugoE\HanniAndHoo\HanniAndHoo\HanniAndHoo\bin\x86\Debug\Content\jump.xnb</Output> 
    57       <Extra>C:\MyTemp\HugoE\HanniAndHoo\HanniAndHoo\HanniAndHoo\bin\x86\Debug\Content\jump.wma</Extra> 
    58       <Time>2017-07-28T09:42:54.1005538+03:00</Time> 
    59     </Item> 
    60     <Item> 
    6151      <Source>Space.jpg</Source> 
    6252      <Name>Space</Name> 
     
    7666      <Extra>C:\MyTemp\HugoE\HanniAndHoo\HanniAndHoo\HanniAndHoo\bin\x86\Debug\Content\taustamusiikki.wma</Extra> 
    7767      <Time>2017-07-28T09:46:43.2171346+03:00</Time> 
     68    </Item> 
     69    <Item> 
     70      <Source>jump.wav</Source> 
     71      <Name>jump</Name> 
     72      <Importer>WavImporter</Importer> 
     73      <Processor>SoundEffectProcessor</Processor> 
     74      <Options>None</Options> 
     75      <Output>C:\MyTemp\HugoE\HanniAndHoo\HanniAndHoo\HanniAndHoo\bin\x86\Debug\Content\jump.xnb</Output> 
     76      <Time>2017-07-28T11:43:02.641641+03:00</Time> 
    7877    </Item> 
    7978    <BuildSuccessful>true</BuildSuccessful> 
  • 2017/30/HugoE/HanniAndHoo/HanniAndHoo/HanniAndHoo/obj/x86/Debug/HanniAndHoo.csproj.FileListAbsolute.txt

    r9189 r9206  
    1414C:\MyTemp\HugoE\HanniAndHoo\HanniAndHoo\HanniAndHoo\bin\x86\Debug\Content\jump.xnb 
    1515C:\MyTemp\HugoE\HanniAndHoo\HanniAndHoo\HanniAndHoo\bin\x86\Debug\Content\TaistelumusaEhdokas2.wma 
    16 C:\MyTemp\HugoE\HanniAndHoo\HanniAndHoo\HanniAndHoo\bin\x86\Debug\Content\jump.wma 
    1716C:\MyTemp\HugoE\HanniAndHoo\HanniAndHoo\HanniAndHoo\bin\x86\Debug\Content\Space.xnb 
    1817C:\MyTemp\HugoE\HanniAndHoo\HanniAndHoo\HanniAndHoo\bin\x86\Debug\Content\taustamusiikki.xnb 
  • 2017/30/HugoE/HanniAndHoo/HanniAndHoo/HanniAndHoo/obj/x86/Debug/cachefile-{C15B7F9E-AA60-42F1-A06A-82A8BC818B5D}-targetpath.txt

    r9189 r9206  
    55Content\TaistelumusaEhdokas2.xnb 
    66Content\TaistelumusaEhdokas2.wma 
    7 Content\jump.xnb 
    8 Content\jump.wma 
    97Content\Space.xnb 
    108Content\taustamusiikki.xnb 
    119Content\taustamusiikki.wma 
     10Content\jump.xnb 
  • 2017/30/HugoE/HanniAndHoo/HanniAndHoo/HanniAndHooContent/HanniAndHooContent.contentproj

    r9189 r9206  
    7979  </ItemGroup> 
    8080  <ItemGroup> 
    81     <Compile Include="jump.mp3"> 
    82       <Name>jump</Name> 
    83       <Importer>Mp3Importer</Importer> 
    84       <Processor>SongProcessor</Processor> 
    85     </Compile> 
    86   </ItemGroup> 
    87   <ItemGroup> 
    8881    <Compile Include="taustamusiikki.mp3"> 
    8982      <Name>taustamusiikki</Name> 
     
    9992    </Compile> 
    10093  </ItemGroup> 
     94  <ItemGroup> 
     95    <Compile Include="jump.wav"> 
     96      <Name>jump</Name> 
     97      <Importer>WavImporter</Importer> 
     98      <Processor>SoundEffectProcessor</Processor> 
     99    </Compile> 
     100  </ItemGroup> 
    101101  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    102102  <!--  To modify your build process, add your task inside one of the targets below and uncomment it.  
Note: See TracChangeset for help on using the changeset viewer.