Changeset 4998 for 2014/24/FransM


Ignore:
Timestamp:
2014-06-13 10:11:20 (5 years ago)
Author:
anlakane
Message:
 
Location:
2014/24/FransM/Supermerjo
Files:
41 added
1 deleted
14 edited

Legend:

Unmodified
Added
Removed
  • 2014/24/FransM/Supermerjo/Supermerjo/Supermerjo/Supermerjo.cs

    r4987 r4998  
    2828    Image VehjeKuva = LoadImage("Vehje"); 
    2929    Image Linna = LoadImage("Talo"); 
     30    Image KiviKuva = LoadImage("Kivi"); 
    3031 
    3132    SoundEffect maaliAani = LoadSoundEffect("maali"); 
     
    3536    public override void Begin() 
    3637    { 
     38        MediaPlayer.Play("musiikki"); 
     39 
    3740        Gravity = new Vector(0, -1000); 
    38  
    3941        LuoKentta(); 
    4042        LisaaNappaimet(); 
     
    6567    void LuoMusiikki() 
    6668    {  
    67      
     69        MediaPlayer.IsRepeating = true; 
     70        SoundEffect hyppyAani = LoadSoundEffect("Musiikki"); 
     71        hyppyAani.Play(); 
    6872    } 
    6973 
     
    8387        ruudut.SetTileMethod(Color.FromHexCode("A349A4"), LisaaVehje); 
    8488        ruudut.SetTileMethod(Color.FromHexCode("84E2FF"), LisaaTalo); 
     89        ruudut.SetTileMethod(Color.FromHexCode("000000"), LisaaKivi); 
     90 
    8591 
    8692        //3. Execute luo kentän 
     
    96102 
    97103    } 
     104 
    98105    void LisaaValikko(PhysicsObject pelaaja,PhysicsObject kohde  
    99106        ) 
     
    137144 
    138145    } 
     146  
     147           void LisaaKivi(Vector paikka, double leveys, double korkeus) 
     148     { 
     149        PlatformCharacter kivi = new PlatformCharacter(leveys, korkeus); 
     150        kivi.Position = paikka; 
     151 
     152        kivi.Mass = 4.0; 
     153        kivi.Image = KiviKuva; 
     154        Add(kivi); 
     155        PlatformWandererBrain tasoAivot = new PlatformWandererBrain(); 
     156        tasoAivot.Speed = 100; 
     157 
     158        kivi.Tag = "Kivi"; 
     159        tasoAivot.FallsOffPlatforms = true; 
     160        tasoAivot.TriesToJump = true; 
     161        tasoAivot.JumpSpeed = 900; 
     162    } 
    139163 
    140164    void LisaaVahinkoAine(Vector paikka, double leveys, double korkeus) 
     
    156180        pelaaja1.Mass = 4.0; 
    157181        pelaaja1.Image = pelaajanKuva; 
    158         AddCollisionHandler(pelaaja1, "Vehje", PelaajaMenettaaHealtti); 
    159         AddCollisionHandler(pelaaja1, "Myrkky", PelaajaOsuuMyrkky); 
     182        AddCollisionHandler(pelaaja1, "Vihollinen", PelaajaMenettaaHealtti); 
     183        AddCollisionHandler(pelaaja1, "Myrkky", TapaPelaaja); 
     184        AddCollisionHandler(pelaaja1, "Kivi", TapaPelaaja); 
    160185        AddCollisionHandler(pelaaja1, "Laava", PelaajaMenettaaHealtti); 
    161186        AddCollisionHandler(pelaaja1, "Talo", LisaaValikko); 
     
    176201      PlatformWandererBrain tasoAivot = new PlatformWandererBrain(); 
    177202      tasoAivot.Speed = 100; 
    178       vehje.Tag = "Vehje"; 
     203      vehje.Tag = "Vihollinen"; 
    179204 
    180205      vehje.Brain = tasoAivot; 
     
    192217        tasoAivot.Speed = 100; 
    193218 
    194         orkki.Tag = "Orkki"; 
     219        orkki.Tag = "Vihollinen"; 
    195220        tasoAivot.FallsOffPlatforms = true; 
    196221        tasoAivot.TriesToJump = true; 
     
    276301        Add(taso); 
    277302    } 
    278     void PelaajaOsuuMyrkky(PhysicsObject pelaaja, PhysicsObject kohde) 
     303    void TapaPelaaja(PhysicsObject pelaaja, PhysicsObject kohde) 
    279304    { 
    280305        PelaajaKuolee(); 
  • 2014/24/FransM/Supermerjo/Supermerjo/Supermerjo/Supermerjo.csproj.Debug.cachefile

    r4987 r4998  
    1515Content\Vehje.xnb 
    1616Content\Talo.xnb 
     17Content\musiikki.xnb 
     18Content\Kivi.xnb 
     19Content\musiikki.wma 
  • 2014/24/FransM/Supermerjo/Supermerjo/Supermerjo/obj/x86/Debug/ContentPipeline-{8DE58630-3F3F-45C3-A5BB-4AF8DED7A7D3}.xml

    r4987 r4998  
    144144      <Output>C:\MyTemp\FransM\Supermerjo\Supermerjo\Supermerjo\bin\x86\Debug\Content\Talo.xnb</Output> 
    145145      <Time>2014-06-12T12:14:41.7853472+03:00</Time> 
     146    </Item> 
     147    <Item> 
     148      <Source>musiikki.mp3</Source> 
     149      <Name>musiikki</Name> 
     150      <Importer>Mp3Importer</Importer> 
     151      <Processor>SongProcessor</Processor> 
     152      <Options>None</Options> 
     153      <Output>c:\mytemp\FransM\Supermerjo\Supermerjo\Supermerjo\bin\x86\Debug\Content\musiikki.xnb</Output> 
     154      <Extra>c:\mytemp\FransM\Supermerjo\Supermerjo\Supermerjo\bin\x86\Debug\Content\musiikki.wma</Extra> 
     155      <Time>2014-06-13T09:26:43.8838474+03:00</Time> 
     156    </Item> 
     157    <Item> 
     158      <Source>Kivi.jpg</Source> 
     159      <Name>Kivi</Name> 
     160      <Importer>TextureImporter</Importer> 
     161      <Processor>TextureProcessor</Processor> 
     162      <Options>None</Options> 
     163      <Output>c:\mytemp\FransM\Supermerjo\Supermerjo\Supermerjo\bin\x86\Debug\Content\Kivi.xnb</Output> 
     164      <Time>2014-06-13T09:40:08+03:00</Time> 
    146165    </Item> 
    147166    <BuildSuccessful>true</BuildSuccessful> 
     
    152171      <BuildConfiguration>Debug</BuildConfiguration> 
    153172      <CompressContent>false</CompressContent> 
    154       <RootDirectory>C:\MyTemp\FransM\Supermerjo\Supermerjo\SupermerjoContent\</RootDirectory> 
    155       <LoggerRootDirectory>C:\MyTemp\FransM\Supermerjo\Supermerjo\Supermerjo\</LoggerRootDirectory> 
    156       <IntermediateDirectory>C:\MyTemp\FransM\Supermerjo\Supermerjo\Supermerjo\obj\x86\Debug\</IntermediateDirectory> 
    157       <OutputDirectory>C:\MyTemp\FransM\Supermerjo\Supermerjo\Supermerjo\bin\x86\Debug\Content\</OutputDirectory> 
     173      <RootDirectory>c:\mytemp\FransM\Supermerjo\Supermerjo\SupermerjoContent\</RootDirectory> 
     174      <LoggerRootDirectory>c:\mytemp\FransM\Supermerjo\Supermerjo\Supermerjo\</LoggerRootDirectory> 
     175      <IntermediateDirectory>c:\mytemp\FransM\Supermerjo\Supermerjo\Supermerjo\obj\x86\Debug\</IntermediateDirectory> 
     176      <OutputDirectory>c:\mytemp\FransM\Supermerjo\Supermerjo\Supermerjo\bin\x86\Debug\Content\</OutputDirectory> 
    158177    </Settings> 
    159178    <Assemblies> 
  • 2014/24/FransM/Supermerjo/Supermerjo/Supermerjo/obj/x86/Debug/Supermerjo.csproj.FileListAbsolute.txt

    r4987 r4998  
    2323C:\MyTemp\FransM\Supermerjo\Supermerjo\Supermerjo\bin\x86\Debug\Content\Vehje.xnb 
    2424C:\MyTemp\FransM\Supermerjo\Supermerjo\Supermerjo\bin\x86\Debug\Content\Talo.xnb 
     25c:\mytemp\FransM\Supermerjo\Supermerjo\Supermerjo\bin\x86\Debug\Content\musiikki.xnb 
     26c:\mytemp\FransM\Supermerjo\Supermerjo\Supermerjo\bin\x86\Debug\Content\musiikki.wma 
     27c:\mytemp\FransM\Supermerjo\Supermerjo\Supermerjo\bin\x86\Debug\Content\Kivi.xnb 
  • 2014/24/FransM/Supermerjo/Supermerjo/Supermerjo/obj/x86/Debug/cachefile-{8DE58630-3F3F-45C3-A5BB-4AF8DED7A7D3}-targetpath.txt

    r4987 r4998  
    1515Content\Vehje.xnb 
    1616Content\Talo.xnb 
     17Content\musiikki.xnb 
     18Content\musiikki.wma 
     19Content\Kivi.xnb 
  • 2014/24/FransM/Supermerjo/Supermerjo/SupermerjoContent/SupermerjoContent.contentproj

    r4987 r4998  
    148148    </Compile> 
    149149  </ItemGroup> 
     150  <ItemGroup> 
     151    <Compile Include="musiikki.mp3"> 
     152      <Name>musiikki</Name> 
     153      <Importer>Mp3Importer</Importer> 
     154      <Processor>SongProcessor</Processor> 
     155    </Compile> 
     156  </ItemGroup> 
     157  <ItemGroup> 
     158    <Compile Include="Kivi.jpg"> 
     159      <Name>Kivi</Name> 
     160      <Importer>TextureImporter</Importer> 
     161      <Processor>TextureProcessor</Processor> 
     162    </Compile> 
     163  </ItemGroup> 
    150164  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    151165  <!--  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.