Changeset 5961


Ignore:
Timestamp:
2015-06-09 15:14:05 (8 years ago)
Author:
mikrkana
Message:
 
Location:
2015/24/VeetiI/LABYRINTTI/LABYRINTTI
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • 2015/24/VeetiI/LABYRINTTI/LABYRINTTI/LABYRINTTI/LABYRINTTI.cs

    r5950 r5961  
    99public class LABYRINTTI : PhysicsGame 
    1010{ 
    11     PhysicsObject pelaaja1; 
    12     Image olionKuva = LoadImage("labyrinttipelihahmo2015"); 
     11    Image olionKuva = LoadImage("hirviötekstuuri"); 
     12 
     13    const double RUUDUN_LEVEYS = 50.0; 
     14    const double RUUDUN_KORKEUS = 50.0; 
    1315 
    1416    public override void Begin() 
    1517    { 
    16         pelaaja1 = new PhysicsObject(200, 200); 
    17         Add(pelaaja1); 
    18         pelaaja1.Image = olionKuva; 
    19         Shape muoto = Shape.FromImage(olionKuva); 
    20         pelaaja1.Shape = muoto; 
     18        //PhysicsObject mob = new PhysicsObject(500,400); 
     19        //Add(mob); 
     20        //mob.Image = olionKuva; 
     21        // TODO: Kirjoita ohjelmakoodisi tähän 
    2122 
    2223 
     
    3637        Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 
    3738    } 
     39    void LuoKentta() 
     40    { 
     41        ColorTileMap ruudut = ColorTileMap.FromLevelAsset("labyrintinkenttä"); 
     42        ruudut.SetTileMethod(Color.Black, LuoSeinä); 
     43        ruudut.Execute(RUUDUN_LEVEYS, RUUDUN_KORKEUS); 
     44    } 
     45    void LuoSeinä(Vector paikka, double leveys, double korkeus) 
     46    { 
    3847 
    39     void LiikutaPelaajaa(Vector vektori) 
     48    } 
     49 
     50 
     51 void LiikutaPelaajaa(Vector vektori) 
    4052    { 
    4153 
    4254        pelaaja1.Push(vektori); 
    4355    } 
    44  
    45  
    46  
    4756 
    4857} 
  • 2015/24/VeetiI/LABYRINTTI/LABYRINTTI/LABYRINTTIContent/LABYRINTTIContent.contentproj

    r5945 r5961  
    6262    </Compile> 
    6363  </ItemGroup> 
    64   <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
     64<ItemGroup> 
     65    <Compile Include="labyrintinkenttä.png"> 
     66      <Name>labyrintinkenttä</Name> 
     67      <Importer>TextureImporter</Importer> 
     68      <Processor>TextureProcessor</Processor> 
     69    </Compile> 
     70  </ItemGroup>  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    6571  <!--  To modify your build process, add your task inside one of the targets below and uncomment it.  
    6672       Other similar extension points exist, see Microsoft.Common.targets. 
Note: See TracChangeset for help on using the changeset viewer.