Changeset 3887


Ignore:
Timestamp:
2012-11-17 16:09:35 (11 years ago)
Author:
jotapoti
Message:

Versio 17.11.2012 iltapäivällä.

Location:
2012/10-20/LeoL/Super Mario classic
Files:
8 added
3 deleted
11 edited

Legend:

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

    r3867 r3887  
    1414 
    1515    PlatformCharacter pelaaja1; 
    16     Image maalinKuva  =  LoadImage("End Block"); 
    17     Image pelaajanKuva = LoadImage("Mario"); 
    18     Image tahtiKuva = LoadImage("Coin"); 
     16    Image Vihukuva = LoadImage("Iggy"); 
     17    Image maalinKuva = LoadImage("Chest"); 
     18    Image pelaajanKuva = LoadImage("Boo"); 
     19    Image tahtiKuva = LoadImage("Lava coin"); 
    1920    // mario = Image.Mirror(pelaajanKuva); 
    2021    SoundEffect maaliAani = LoadSoundEffect("maali"); 
    21     Image PalikkanKuva = LoadImage("multa"); 
     22    Image PalikkanKuva = LoadImage("Maa W1"); 
     23     
     24    // Pelin alussa ollaan kentässä 1 
     25    int kenttaNro = 1; 
     26     
    2227    public override void Begin() 
    2328    { 
    24          
     29        SeuraavaKentta(); 
     30    } 
     31    void SeuraavaKentta() 
     32    { 
     33        ClearAll (); 
    2534 
    26         LuoKentta("kentta1"); 
     35        if(kenttaNro == 1) LuoKentta("Kentta1"); 
     36        else if (kenttaNro == 2) LuoKentta("kentta2"); 
     37        else if(kenttaNro == 3) LuoKentta("Kentta3"); 
     38        else if(kenttaNro > 3) Exit(); 
    2739 
    2840    } 
     
    3547        kentta.SetTileMethod('N', LisaaPelaaja); 
    3648        kentta.SetTileMethod('E', LisaaMaali); 
    37         kentta.SetTileMethod('s', LisaaDeath); 
     49        kentta.SetTileMethod('K', LisaaVihu); 
     50        //kentta.SetTileMethod('s', LisaaDeath); 
    3851        kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 
    3952        Level.CreateBorders(); 
    40         Level.Background.CreateGradient(Color.Brown 
     53        Level.Background.CreateGradient(Color.DarkRed 
    4154            , Color.Black); 
    4255 
     
    5568        taso.Image = maalinKuva; 
    5669        Add(taso); 
    57         taso.Tag = "End block"; 
     70        taso.Tag = "Chest"; 
    5871    } 
    5972    void LisaaTaso(Vector paikka, double leveys, double korkeus) 
     
    6376        taso.Image = PalikkanKuva; 
    6477        Add(taso); 
    65     }    
     78    } 
    6679 
    6780    void LisaaTahti(Vector paikka, double leveys, double korkeus) 
     
    7184        tahti.Position = paikka; 
    7285        tahti.Image = tahtiKuva; 
    73         tahti.Tag = "coin"; 
     86        tahti.Tag = "Lava coin"; 
    7487        Add(tahti); 
    7588    } 
     
    8194        pelaaja1.Mass = 4.0; 
    8295        pelaaja1.Image = pelaajanKuva; 
    83         AddCollisionHandler(pelaaja1, "coin", TormaaTahteen); 
    84         AddCollisionHandler(pelaaja1, "End block", TormaaMaaliin); 
     96        AddCollisionHandler(pelaaja1, "Lava coin", TormaaTahteen); 
     97        AddCollisionHandler(pelaaja1, "Chest", TormaaMaaliin); 
    8598        Add(pelaaja1); 
    8699    } 
     
    117130    { 
    118131        maaliAani.Play(); 
    119         MessageDisplay.Add("You have a coin"); 
     132        MessageDisplay.Add("Lava coin"); 
    120133        tahti.Destroy(); 
    121134    } 
     
    123136    void TormaaMaaliin(PhysicsObject maali, PhysicsObject tormaaja) 
    124137    { 
    125         ClearAll(); 
    126         LuoKentta("kentta2");  
     138        kenttaNro++; 
     139        SeuraavaKentta(); 
     140    } 
     141 
     142    void LisaaVihu(Vector paikka, double leveys, double korkeus) 
     143    { 
     144        PhysicsObject Vihu = PhysicsObject.CreateStaticObject(leveys, korkeus); 
     145        Vihu.IgnoresCollisionResponse = true; 
     146        Vihu.Position = paikka; 
     147        Vihu.Image = Vihukuva; 
     148        Vihu.Tag = "Iggy"; 
     149        Add(Vihu); 
    127150    } 
    128151 
  • 2012/10-20/LeoL/Super Mario classic/Super Mario classic/Super Mario classic/obj/x86/Debug/Super Mario classic.csproj.FileListAbsolute.txt

    r3867 r3887  
    2424C:\MyTemp\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Content\End block.xnb 
    2525C:\MyTemp\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Content\kentta2.xnb 
     26C:\MyTemp\ohjelmointikerho\10-20\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\obj\x86\Debug\Super Mario classic.exe 
     27C:\MyTemp\ohjelmointikerho\10-20\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\obj\x86\Debug\Super Mario classic.pdb 
     28C:\MyTemp\ohjelmointikerho\10-20\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Content\maali.xnb 
     29C:\MyTemp\ohjelmointikerho\10-20\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Content\kentta1.xnb 
     30C:\MyTemp\ohjelmointikerho\10-20\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Content\kentta2.xnb 
     31C:\MyTemp\ohjelmointikerho\10-20\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Content\Boo.xnb 
     32C:\MyTemp\ohjelmointikerho\10-20\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Content\Maa W1.xnb 
     33C:\MyTemp\ohjelmointikerho\10-20\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Super Mario classic.exe 
     34C:\MyTemp\ohjelmointikerho\10-20\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Super Mario classic.pdb 
     35C:\MyTemp\ohjelmointikerho\10-20\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Jypeli.dll 
     36C:\MyTemp\ohjelmointikerho\10-20\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Jypeli.xml 
     37C:\MyTemp\ohjelmointikerho\10-20\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\obj\x86\Debug\ResolveAssemblyReference.cache 
     38C:\MyTemp\ohjelmointikerho\10-20\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\obj\x86\Debug\Microsoft.Xna.Framework.RuntimeProfile.txt 
     39C:\MyTemp\ohjelmointikerho\10-20\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Content\Lava coin.xnb 
     40C:\MyTemp\ohjelmointikerho\10-20\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Content\Chest.xnb 
     41C:\MyTemp\ohjelmointikerho\10-20\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Content\Maa Castle.xnb 
     42C:\MyTemp\ohjelmointikerho\10-20\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Content\kentta3.xnb 
     43C:\MyTemp\ohjelmointikerho\10-20\LeoL\Super Mario classic\Super Mario classic\Super Mario classic\bin\x86\Debug\Content\Iggy.xnb 
  • 2012/10-20/LeoL/Super Mario classic/Super Mario classic/Super Mario classicContent/Super Mario classicContent.contentproj

    r3867 r3887  
    4545  </ItemGroup> 
    4646  <ItemGroup> 
     47    <Compile Include="kentta1.txt"> 
     48      <Name>kentta1</Name> 
     49      <Importer>TextFileImporter</Importer> 
     50      <Processor>TextFileContentProcessor</Processor> 
     51    </Compile> 
    4752    <Compile Include="maali.wav"> 
    4853      <Name>maali</Name> 
     
    5055      <Processor>SoundEffectProcessor</Processor> 
    5156    </Compile> 
    52     <Compile Include="norsu.png"> 
    53       <Name>norsu</Name> 
    54       <Importer>TextureImporter</Importer> 
    55       <Processor>TextureProcessor</Processor> 
    56     </Compile> 
    57     <Compile Include="tahti.png"> 
    58       <Name>tahti</Name> 
    59       <Importer>TextureImporter</Importer> 
    60       <Processor>TextureProcessor</Processor> 
    61     </Compile> 
    62     <Compile Include="kentta1.txt"> 
    63       <Name>kentta1</Name> 
    64       <Importer>TextFileImporter</Importer> 
    65       <Processor>TextFileContentProcessor</Processor> 
    66     </Compile> 
    6757  </ItemGroup> 
    6858  <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> 
     59    <Compile Include="Boo.png"> 
     60      <Name>Boo</Name> 
    9261      <Importer>TextureImporter</Importer> 
    9362      <Processor>TextureProcessor</Processor> 
     
    10170    </Compile> 
    10271  </ItemGroup> 
     72  <ItemGroup> 
     73    <Compile Include="Maa W1.png"> 
     74      <Name>Maa W1</Name> 
     75      <Importer>TextureImporter</Importer> 
     76      <Processor>TextureProcessor</Processor> 
     77    </Compile> 
     78  </ItemGroup> 
     79  <ItemGroup> 
     80    <Compile Include="Lava coin.png"> 
     81      <Name>Lava coin</Name> 
     82      <Importer>TextureImporter</Importer> 
     83      <Processor>TextureProcessor</Processor> 
     84    </Compile> 
     85  </ItemGroup> 
     86  <ItemGroup> 
     87    <Compile Include="Chest.png"> 
     88      <Name>Chest</Name> 
     89      <Importer>TextureImporter</Importer> 
     90      <Processor>TextureProcessor</Processor> 
     91    </Compile> 
     92  </ItemGroup> 
     93  <ItemGroup> 
     94    <Compile Include="Maa Castle.png"> 
     95      <Name>Maa Castle</Name> 
     96      <Importer>TextureImporter</Importer> 
     97      <Processor>TextureProcessor</Processor> 
     98    </Compile> 
     99  </ItemGroup> 
     100  <ItemGroup> 
     101    <Compile Include="kentta3.txt"> 
     102      <Name>kentta3</Name> 
     103      <Importer>TextFileImporter</Importer> 
     104      <Processor>TextFileContentProcessor</Processor> 
     105    </Compile> 
     106  </ItemGroup> 
     107  <ItemGroup> 
     108    <Compile Include="Iggy.png"> 
     109      <Name>Iggy</Name> 
     110      <Importer>TextureImporter</Importer> 
     111      <Processor>TextureProcessor</Processor> 
     112    </Compile> 
     113  </ItemGroup> 
    103114  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    104115  <!--  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.