Changeset 5216 for 2014/27


Ignore:
Timestamp:
2014-07-01 12:16:02 (5 years ago)
Author:
mijoilmo
Message:
 
Location:
2014/27/AleksanteriV
Files:
23 added
5 edited

Legend:

Unmodified
Added
Removed
  • 2014/27/AleksanteriV/Protokolla236TrueSurvivor/Protokolla236TrueSurvivor/Protokolla236TrueSurvivor/Ohjelma.cs

    r5213 r5216  
    66    static void Main(string[] args) 
    77    { 
    8         using (Protokolla236TrueSurvivor game = new Protokolla236TrueSurvivor()) 
     8        using (Proto236b game = new Proto236b()) 
    99        { 
    1010#if !DEBUG 
  • 2014/27/AleksanteriV/Protokolla236TrueSurvivor/Protokolla236TrueSurvivor/Protokolla236TrueSurvivor/Protokolla236TrueSurvivor.cs

    r5213 r5216  
    77using Jypeli.Widgets; 
    88 
    9 public class Protokolla236TrueSurvivor : PhysicsGame 
     9public class Proto236b : PhysicsGame //true survivor 
    1010{ 
     11    Image[] images = new Image[1]; 
     12    void AssignKeys() 
     13    { 
     14        Keyboard.Listen(Key.Escape, ButtonState.Down, Exit, "Lopeta Peli"); 
     15    } 
     16    void LoadAllImages() 
     17    { 
     18        images[0] = LoadImage("graphics/backgrounds/space_background"); 
     19    } 
     20    void LoadLevel(int level) 
     21    { 
     22        ClearAll(); 
     23        AssignKeys(); 
     24        LevelFromImage("graphics/levels/" + level); 
     25    } 
     26    void LevelFromImage(string levelName) 
     27    { 
     28        ColorTileMap tileMap = ColorTileMap.FromLevelAsset(levelName); 
     29        tileMap.Execute(); 
     30    } 
    1131    public override void Begin() 
    1232    { 
    13         // TODO: Kirjoita ohjelmakoodisi tähän 
    14  
    15         PhoneBackButton.Listen(ConfirmExit, "Lopeta peli"); 
    16         Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 
     33        // TODO: Kirjoita peli tähän 
     34        LoadAllImages(); 
     35        LoadLevel(0); 
    1736    } 
    1837} 
  • 2014/27/AleksanteriV/Protokolla236TrueSurvivor/Protokolla236TrueSurvivor/Protokolla236TrueSurvivorContent/Protokolla236TrueSurvivorContent.contentproj

    r5213 r5216  
    4545    <Reference Include="AnimationExtension" /> 
    4646  </ItemGroup> 
     47  <ItemGroup /> 
     48  <ItemGroup> 
     49    <Compile Include="graphics\backgrounds\space_background.png"> 
     50      <Name>space_background</Name> 
     51      <Importer>TextureImporter</Importer> 
     52      <Processor>TextureProcessor</Processor> 
     53    </Compile> 
     54  </ItemGroup> 
    4755  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    4856  <!--  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.