Changeset 2273 for 2011/26


Ignore:
Timestamp:
2011-06-29 12:26:41 (12 years ago)
Author:
saselamp
Message:
 
Location:
2011/26/JimiL/Pelit/pelit22/world of Chuckland fix fix
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • 2011/26/JimiL/Pelit/pelit22/world of Chuckland fix fix/world of Chuckland fix fix/Peli.cs

    r2267 r2273  
    88 
    99public class Peli : PhysicsGame 
     10     
    1011{ 
    1112    const double nopeus = 200; 
     
    1415 
    1516    PlatformCharacter pelaaja1; 
     17    GameObject heppu; 
     18     
    1619 
    1720    Image pelaajanKuva = LoadImage("norsu"); 
     
    2427    Image vesiKuva = LoadImage("vesi"); 
    2528    Image pilvikuva = LoadImage("pilvi"); 
     29    Image heppukuva = LoadImage("heppu"); 
     30    Image ruohokuva = LoadImage("ruoho"); 
    2631 
    2732 
     
    5358        kentta[';'] = lisaavesi; 
    5459        kentta['B'] = lisaapilvi; 
     60        kentta['H'] = lisaaheppu; 
     61        kentta['='] = lisaaruoho; 
     62 
     63 
    5564 
    5665 
     
    5867        Level.CreateBorders(); 
    5968        Level.Background.CreateGradient(Color.White, Color.SkyBlue); 
     69    } 
     70    PhysicsObject lisaaruoho() 
     71    { 
     72        PhysicsObject ruoho = PhysicsObject.CreateStaticObject(50, 50); 
     73        ruoho.Image = ruohokuva; 
     74        ruoho.Tag = "ruoho"; 
     75 
     76        Add(ruoho); 
     77        return ruoho; 
    6078    } 
    6179    PhysicsObject lisaapilvi() 
     
    132150        return tahti; 
    133151    } 
    134  
     152    GameObject lisaaheppu() 
     153    { 
     154        GameObject heppu = new GameObject(50, 50); 
     155        
     156        heppu. Image  = heppukuva; 
     157        Add(heppu); 
     158        return heppu; 
     159    } 
    135160    PlatformCharacter lisaaPelaaja() 
    136161    { 
     
    167192        hahmo.Jump(nopeus); 
    168193    } 
    169  
     194    void osupelaajaan(GameObject hahmo, PlatformCharacter kohde) 
     195    { 
     196        if (kohde.Tag.ToString() == "pelaaja1") 
     197        { 
     198            maaliAani.Play(); 
     199            MessageDisplay.Add("Die"); 
     200            kohde.Destroy(); 
     201        } 
     202    } 
    170203    void osuTahteen(PhysicsObject hahmo, PhysicsObject kohde) 
    171204    { 
  • 2011/26/JimiL/Pelit/pelit22/world of Chuckland fix fix/world of Chuckland fix fix/kentta1.txt

    r2256 r2273  
    2121%%##################                                                                                                                                                                        ##%%%%%%%%%%####################################################### #######################################################################################;;;;;;;;;;;;;                                                                                                                                         %%#%%%%%%%%%%%##%##### 
    2222%%################################################ %%%%                                                                                             ###                                     #########################^^########### ############################ # %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%###################################################;;;;;;;;;;;;; 
    23 %%##################################################### %%%%%                 %%                                                                    ###                                   ####%%%%%%%^^^^^^^^^^^^^^^^^^########## ############################ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
     23%%##################################################### %%%%%                 %%                                        H                            ###                                   ####%%%%%%%^^^^^^^^^^^^^^^^^^########## ############################ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
    2424%%###########################################################;;;;;;;;;;;;;;;##%%%%%=============================     ========                      #####=============================########^^^^^^^^^^^^^^%%%%%%%%%%%%%%%%######### ########################### 
    2525###########^^^^^^^^^^#########################################;;;;;;;;;;;;;#####################################;;;;#########;;;;;;;;;;;;############################################################################################ %%%%%%%%%%%%%%%%%%%%%%%%% 
  • 2011/26/JimiL/Pelit/pelit22/world of Chuckland fix fix/world of Chuckland fix fixContent/world of Chuckland fix fixContent.contentproj

    r2266 r2273  
    143143    </Compile> 
    144144  </ItemGroup> 
     145  <ItemGroup> 
     146    <Compile Include="heppu.bmp"> 
     147      <Name>heppu</Name> 
     148      <Importer>TextureImporter</Importer> 
     149      <Processor>TextureProcessor</Processor> 
     150    </Compile> 
     151  </ItemGroup> 
    145152  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    146153  <!--  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.