Changeset 4293 for 2013/26


Ignore:
Timestamp:
2013-06-28 10:16:17 (10 years ago)
Author:
miktiili
Message:

Talletus.

Location:
2013/26/MikkoTi/Tasohyppelypeli3
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • 2013/26/MikkoTi/Tasohyppelypeli3/Tasohyppelypeli3/Tasohyppelypeli3/Tasohyppelypeli3.cs

    r4261 r4293  
    1717    int kenttaNro = 1; 
    1818 
    19     Image pelaajanKuva = LoadImage("Hahmo"); 
     19    Image pelaajanKuva = LoadImage("Hahmo2"); 
    2020    Image tahtiKuva = LoadImage("AmmoBox"); 
    2121    Image maaliKuva = LoadImage("MaalinKuva"); 
    2222    Image esteenKuva = LoadImage("Este"); 
     23    Image PinkBoxKuva = LoadImage("PinkBox"); 
     24 
    2325 
    2426    public override void Begin() 
     
    2628    { 
    2729        SeuraavaKentta(); 
    28         Camera.Zoom(0.8); 
     30        Camera.Zoom(0.5); 
    2931    } 
    3032 
     
    5557        kentta.SetTileMethod('N', LisaaPelaaja); 
    5658        kentta.SetTileMethod('M', LisaaMaali); 
     59        kentta.SetTileMethod('P', LisaaPinkBox); 
    5760        kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 
    5861        Level.CreateBorders(false); 
     
    8487    } 
    8588 
     89    void LisaaPinkBox(Vector paikka, double leveys, double korkeus) 
     90    { 
     91        PhysicsObject pinkbox = PhysicsObject.CreateStaticObject(leveys, korkeus); 
     92        pinkbox.IgnoresCollisionResponse = true; 
     93        pinkbox.Position = paikka; 
     94        pinkbox.Image = PinkBoxKuva; 
     95        pinkbox.Tag = "PinkBox"; 
     96        Add(pinkbox); 
     97    } 
     98 
    8699    void LisaaTahti(Vector paikka, double leveys, double korkeus) 
    87100    { 
     
    98111        pelaaja1 = new PlatformCharacter(leveys, korkeus); 
    99112        pelaaja1.Position = paikka; 
    100         pelaaja1.Mass = 4.0; 
     113        pelaaja1.Mass = 3.9; 
    101114        pelaaja1.Image = pelaajanKuva; 
    102115        AddCollisionHandler(pelaaja1, "AmmoBox", TormaaTahteen); 
  • 2013/26/MikkoTi/Tasohyppelypeli3/Tasohyppelypeli3/Tasohyppelypeli3Content/Kentta6.txt

    r4261 r4293  
    2121####*****################## ## 
    2222#*************************# ## 
    23 #*************************# ## 
     23#*************************P ## 
    2424#*************************#M## 
    2525############################## 
  • 2013/26/MikkoTi/Tasohyppelypeli3/Tasohyppelypeli3/Tasohyppelypeli3Content/Tasohyppelypeli3Content.contentproj

    r4261 r4293  
    5353    <Compile Include="norsu.png"> 
    5454      <Name>norsu</Name> 
     55      <Importer>TextureImporter</Importer> 
     56      <Processor>TextureProcessor</Processor> 
     57    </Compile> 
     58    <Compile Include="PinkBox.png"> 
     59      <Name>PinkBox</Name> 
    5560      <Importer>TextureImporter</Importer> 
    5661      <Processor>TextureProcessor</Processor> 
     
    130135    </Compile> 
    131136  </ItemGroup> 
     137  <ItemGroup> 
     138    <Compile Include="Hahmo2.png"> 
     139      <Name>Hahmo2</Name> 
     140      <Importer>TextureImporter</Importer> 
     141      <Processor>TextureProcessor</Processor> 
     142    </Compile> 
     143  </ItemGroup> 
    132144  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    133145  <!--  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.