Changeset 6522 for 2014


Ignore:
Timestamp:
2015-06-29 14:50:42 (4 years ago)
Author:
misakana
Message:
 
Location:
2014/koodauskerho/38/PietuR/SoHaG/SoHaG
Files:
14 added
3 edited

Legend:

Unmodified
Added
Removed
  • 2014/koodauskerho/38/PietuR/SoHaG/SoHaG/SoHaG/SoHaG.cs

    r6496 r6522  
    99public class SoHaG : PhysicsGame 
    1010{ 
     11 
     12    Image SeinanKuva = LoadImage("Seina01"); 
     13 
    1114    public override void Begin() 
    1215    { 
     16        LuoKentta01(); 
     17 
    1318        PhysicsObject Tyyppi = new PhysicsObject(100, 100); 
    1419        Tyyppi.Shape = Shape.Octagon; 
    1520        Add(Tyyppi); 
    1621 
    17         PhoneBackButton.Listen(ConfirmExit, "Lopeta peli"); 
    1822        Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 
    1923    } 
     24 
     25         
     26        void LuoKentta01 () 
     27        { 
     28            ColorTileMap Ruudut  = ColorTileMap.FromLevelAsset("Kenttä01"); 
     29             
     30            Ruudut.SetTileMethod(Color.Black, LuoSeina); 
     31 
     32            Ruudut.Execute(20, 20); 
     33 
     34        } 
     35 
     36        void LuoSeina(Vector Paikka, double leveys, double korkeus) 
     37      { 
     38          PhysicsObject Seina = PhysicsObject.CreateStaticObject(leveys, korkeus); 
     39            Seina.Position = Paikka; 
     40            Seina.Image = SeinanKuva; 
     41            Add(Seina); 
     42      } 
    2043} 
  • 2014/koodauskerho/38/PietuR/SoHaG/SoHaG/SoHaGContent/SoHaGContent.contentproj

    r6496 r6522  
    4545    <Reference Include="AnimationExtension" /> 
    4646  </ItemGroup> 
     47  <ItemGroup> 
     48    <Compile Include="Kenttä01.png"> 
     49      <Name>Kenttä01</Name> 
     50      <Importer>TextureImporter</Importer> 
     51      <Processor>TextureProcessor</Processor> 
     52    </Compile> 
     53  </ItemGroup> 
     54  <ItemGroup> 
     55    <Compile Include="Seina01.png"> 
     56      <Name>Seina01</Name> 
     57      <Importer>TextureImporter</Importer> 
     58      <Processor>TextureProcessor</Processor> 
     59    </Compile> 
     60  </ItemGroup> 
    4761  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    4862  <!--  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.