Changeset 3867 for 2012/10-20/LeoL


Ignore:
Timestamp:
2012-10-20 15:58:03 (11 years ago)
Author:
hniemi
Message:

Tavarat turvaan.

Location:
2012/10-20/LeoL/Super Mario classic
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • 2012/10-20/LeoL/Super Mario classic/Super Mario classic/Super Mario classic/Super Mario classic.csproj

    r3861 r3867  
    120120  </ItemGroup> 
    121121  <ItemGroup> 
    122     <ProjectReference Include="..\Super_Mario_classicContent\Super_Mario_classicContent.contentproj"> 
    123       <Name>Super_Mario_classicContent</Name> 
     122    <ProjectReference Include="..\Super Mario classicContent\Super Mario classicContent.contentproj"> 
     123      <Project>{93A0E60D-E2E7-4F29-82A2-FA9BC2248856}</Project> 
     124      <Name>Super Mario classicContent %28Content%29</Name> 
    124125      <XnaReferenceType>Content</XnaReferenceType> 
    125126    </ProjectReference> 
  • 2012/10-20/LeoL/Super Mario classic/Super Mario classic/Super Mario classic/Super_Mario_classic.cs

    r3861 r3867  
    1414 
    1515    PlatformCharacter pelaaja1; 
    16  
    17     Image pelaajanKuva = LoadImage("norsu"); 
    18     Image tahtiKuva = LoadImage("tahti"); 
     16    Image maalinKuva  =  LoadImage("End Block"); 
     17    Image pelaajanKuva = LoadImage("Mario"); 
     18    Image tahtiKuva = LoadImage("Coin"); 
    1919    // mario = Image.Mirror(pelaajanKuva); 
    2020    SoundEffect maaliAani = LoadSoundEffect("maali"); 
    21  
     21    Image PalikkanKuva = LoadImage("multa"); 
    2222    public override void Begin() 
    2323    { 
    24         Gravity = new Vector(0, -1000); 
     24         
    2525 
    26         LuoKentta(); 
     26        LuoKentta("kentta1"); 
     27 
     28    } 
     29 
     30    void LuoKentta(string kenttatiedosto) 
     31    { 
     32        TileMap kentta = TileMap.FromLevelAsset(kenttatiedosto); 
     33        kentta.SetTileMethod('#', LisaaTaso); 
     34        kentta.SetTileMethod('*', LisaaTahti); 
     35        kentta.SetTileMethod('N', LisaaPelaaja); 
     36        kentta.SetTileMethod('E', LisaaMaali); 
     37        kentta.SetTileMethod('s', LisaaDeath); 
     38        kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 
     39        Level.CreateBorders(); 
     40        Level.Background.CreateGradient(Color.Brown 
     41            , Color.Black); 
     42 
    2743        LisaaNappaimet(); 
    2844 
     
    3046        Camera.ZoomFactor = 1.2; 
    3147        Camera.StayInLevel = true; 
     48 
     49        Gravity = new Vector(0, -1000); 
    3250    } 
    33  
    34     void LuoKentta() 
     51    void LisaaMaali(Vector paikka, double leveys, double korkeus) 
    3552    { 
    36         TileMap kentta = TileMap.FromLevelAsset("kentta1"); 
    37         kentta.SetTileMethod('#', LisaaTaso); 
    38         kentta.SetTileMethod('*', LisaaTahti); 
    39         kentta.SetTileMethod('N', LisaaPelaaja); 
    40         kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 
    41         Level.CreateBorders(); 
    42         Level.Background.CreateGradient(Color.White, Color.SkyBlue); 
     53        PhysicsObject taso = PhysicsObject.CreateStaticObject(leveys, korkeus); 
     54        taso.Position = paikka; 
     55        taso.Image = maalinKuva; 
     56        Add(taso); 
     57        taso.Tag = "End block"; 
    4358    } 
    44  
    4559    void LisaaTaso(Vector paikka, double leveys, double korkeus) 
    4660    { 
    4761        PhysicsObject taso = PhysicsObject.CreateStaticObject(leveys, korkeus); 
    4862        taso.Position = paikka; 
    49         taso.Color = Color.Green; 
     63        taso.Image = PalikkanKuva; 
    5064        Add(taso); 
    51     } 
     65    }    
    5266 
    5367    void LisaaTahti(Vector paikka, double leveys, double korkeus) 
     
    5771        tahti.Position = paikka; 
    5872        tahti.Image = tahtiKuva; 
    59         tahti.Tag = "tahti"; 
     73        tahti.Tag = "coin"; 
    6074        Add(tahti); 
    6175    } 
     
    6781        pelaaja1.Mass = 4.0; 
    6882        pelaaja1.Image = pelaajanKuva; 
    69         AddCollisionHandler(pelaaja1, "tahti", TormaaTahteen); 
     83        AddCollisionHandler(pelaaja1, "coin", TormaaTahteen); 
     84        AddCollisionHandler(pelaaja1, "End block", TormaaMaaliin); 
    7085        Add(pelaaja1); 
    7186    } 
     
    102117    { 
    103118        maaliAani.Play(); 
    104         MessageDisplay.Add("Keräsit tähden!"); 
     119        MessageDisplay.Add("You have a coin"); 
    105120        tahti.Destroy(); 
    106121    } 
     122 
     123    void TormaaMaaliin(PhysicsObject maali, PhysicsObject tormaaja) 
     124    { 
     125        ClearAll(); 
     126        LuoKentta("kentta2");  
     127    } 
     128 
    107129} 
  • 2012/10-20/LeoL/Super Mario classic/Super Mario classic/Super Mario classic/obj/x86/Debug/Super Mario classic.csproj.FileListAbsolute.txt

    r3861 r3867  
    77C:\MyTemp\ohjelmointikerho\SMC\Super Mario classic\Super Mario classic\Super Mario classic\obj\x86\Debug\Super Mario classic.exe 
    88C:\MyTemp\ohjelmointikerho\SMC\Super Mario classic\Super Mario classic\Super Mario classic\obj\x86\Debug\Super Mario classic.pdb 
     9C:\MyTemp\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Super Mario classic.exe 
     10C:\MyTemp\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Super Mario classic.pdb 
     11C:\MyTemp\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Jypeli.dll 
     12C:\MyTemp\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Jypeli.xml 
     13C:\MyTemp\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\obj\x86\Debug\ResolveAssemblyReference.cache 
     14C:\MyTemp\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\obj\x86\Debug\Microsoft.Xna.Framework.RuntimeProfile.txt 
     15C:\MyTemp\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\obj\x86\Debug\Super Mario classic.exe 
     16C:\MyTemp\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\obj\x86\Debug\Super Mario classic.pdb 
     17C:\MyTemp\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Content\maali.xnb 
     18C:\MyTemp\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Content\norsu.xnb 
     19C:\MyTemp\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Content\tahti.xnb 
     20C:\MyTemp\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Content\kentta1.xnb 
     21C:\MyTemp\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Content\Mario.xnb 
     22C:\MyTemp\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Content\multa.xnb 
     23C:\MyTemp\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Content\Coin.xnb 
     24C:\MyTemp\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Content\End block.xnb 
     25C:\MyTemp\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Content\kentta2.xnb 
  • 2012/10-20/LeoL/Super Mario classic/Super Mario classic/Super Mario classicContent/Super Mario classicContent.contentproj

    r3861 r3867  
    6666    </Compile> 
    6767  </ItemGroup> 
     68  <ItemGroup> 
     69    <Compile Include="Mario.png"> 
     70      <Name>Mario</Name> 
     71      <Importer>TextureImporter</Importer> 
     72      <Processor>TextureProcessor</Processor> 
     73    </Compile> 
     74  </ItemGroup> 
     75  <ItemGroup> 
     76    <Compile Include="multa.png"> 
     77      <Name>multa</Name> 
     78      <Importer>TextureImporter</Importer> 
     79      <Processor>TextureProcessor</Processor> 
     80    </Compile> 
     81  </ItemGroup> 
     82  <ItemGroup> 
     83    <Compile Include="Coin.png"> 
     84      <Name>Coin</Name> 
     85      <Importer>TextureImporter</Importer> 
     86      <Processor>TextureProcessor</Processor> 
     87    </Compile> 
     88  </ItemGroup> 
     89  <ItemGroup> 
     90    <Compile Include="End block.png"> 
     91      <Name>End block</Name> 
     92      <Importer>TextureImporter</Importer> 
     93      <Processor>TextureProcessor</Processor> 
     94    </Compile> 
     95  </ItemGroup> 
     96  <ItemGroup> 
     97    <Compile Include="kentta2.txt"> 
     98      <Name>kentta2</Name> 
     99      <Importer>TextFileImporter</Importer> 
     100      <Processor>TextFileContentProcessor</Processor> 
     101    </Compile> 
     102  </ItemGroup> 
    68103  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    69104  <!--  To modify your build process, add your task inside one of the targets below and uncomment it.  
  • 2012/10-20/LeoL/Super Mario classic/Super Mario classic/Super Mario classicContent/kentta1.txt

    r3861 r3867  
    1          * 
    2          ## 
    3  
    4        *    * 
    5        ##  ## 
    6  
    7      *        * 
    8      ##  ##  ## 
    9  
    10    *    *  *    *      
    11    ##  ##  ##  ## 
    12  
    13  *    *       *   * 
    14  ##  ##  ##  ##  ## 
    15  
    16         N 
    17 ###################### 
     1*                        *                  E                            
     2********************** ******** *******  ***  
     3* N # ******** ****** ###########***** ###*****    
     4#################   ###########################   
     5#################sss###########################ssssssssss                                                                                                                                                                                                                                
Note: See TracChangeset for help on using the changeset viewer.