Changeset 3018 for 2012/24


Ignore:
Timestamp:
2012-06-14 13:30:25 (11 years ago)
Author:
leoslimi
Message:

Talletus.

Location:
2012/24/LeeviL
Files:
3 added
13 edited

Legend:

Unmodified
Added
Removed
  • 2012/24/LeeviL/Rangoneina/Rangoneina/Rangoneina/Rangoneina.cs

    r3016 r3018  
    1616    Image Vih3I = LoadImage("Vih3"); 
    1717    PhysicsObject Rekuroka; 
     18    PhysicsObject Serunom; 
    1819    PhysicsObject Merinoma; 
    1920    IntMeter Pistelaskuri; 
     21    int kenttaNro = 1; 
    2022    public override void Begin() 
    2123    { 
     
    2426        Add(valikko); 
    2527 
    26         LuoKentta(); 
    27         AsetaOhjaimet(); 
     28 
    2829         
    2930 
    3031    } 
    3132 
    32     void LuoKentta() 
    33     { 
    34         TileMap ruudut = TileMap.FromLevelAsset("Kentta1"); 
     33    void LuoKentta(string KenttaTiedosto) 
     34    { 
     35        TileMap ruudut = TileMap.FromLevelAsset(KenttaTiedosto); 
    3536        ruudut.SetTileMethod('=', LuoPalikka); 
    3637        ruudut.SetTileMethod('T', LuoTahti); 
     
    3940        ruudut.SetTileMethod('3', Vih3); 
    4041        ruudut.SetTileMethod('R', LuoRekuroka); 
    41         ruudut.SetTileMethod('S', Serunom); 
     42        ruudut.SetTileMethod('S', LuoSerunom); 
    4243        ruudut.SetTileMethod('M', LuoMerinoma); 
    4344        ruudut.SetTileMethod('W', LuoPiste); 
     
    5556    { 
    5657        ClearAll(); 
     58 
     59        AsetaOhjaimet(); 
     60 
     61        if (kenttaNro == 1) LuoKentta("Kentta1"); 
     62        else if (kenttaNro == 2) LuoKentta("Kentta2"); 
     63        else if (kenttaNro == 3) LuoKentta("Kentta3"); 
     64        else if (kenttaNro > 3) Exit(); 
     65 
     66 
    5767    } 
    5868 
     
    6676        AddCollisionHandler(Rekuroka, "LuoPiste", Tormays2); 
    6777        AddCollisionHandler(Rekuroka, "Kuolema", Tormays3); 
     78        AddCollisionHandler(Rekuroka, "UusiKentta", Tormays4); 
    6879        Add(Rekuroka); 
    6980    } 
    7081 
    71     void Serunom(Vector paikka, double leveys, double korkeus) 
    72     { 
    73         PhysicsObject Serunom = new PhysicsObject(leveys, korkeus); 
     82    void LuoSerunom(Vector paikka, double leveys, double korkeus) 
     83    { 
     84        Serunom = new PhysicsObject(leveys, korkeus); 
    7485        Serunom.Image = SerunomI; 
    7586        Serunom.Restitution = 0.0; 
    7687        Serunom.Position = paikka; 
     88        Serunom.Tag = "UusiKentta"; 
    7789        Add(Serunom); 
    7890    } 
     
    119131        PhysicsObject palikka = PhysicsObject.CreateStaticObject(leveys, korkeus); 
    120132        palikka.Shape = Shape.Rectangle; 
    121         palikka.Color = Color.Black; 
     133        palikka.Color = Color.Green; 
    122134        palikka.Restitution = 0.0; 
    123135        palikka.Position = paikka; 
     136        palikka.CollisionIgnoreGroup = 1; 
    124137        Add(palikka); 
    125138    } 
     
    180193    } 
    181194 
     195    void Tormays4(IPhysicsObject Rekuroka, IPhysicsObject kohde) 
     196    { 
     197        if (kohde == Serunom) 
     198        { 
     199            kenttaNro++; 
     200            SeuraavaKentta(kenttaNro); 
     201        } 
     202    } 
     203 
    182204    void PainettiinValikkoNappia(int valinta) 
    183205    { 
     
    185207        {  
    186208            case 0: 
    187                 //AloitaPeli(); 
     209                SeuraavaKentta(kenttaNro); 
    188210                break; 
    189211            case 1: 
     
    227249    { 
    228250        ClearAll(); 
    229         LuoKentta(); 
    230         AsetaOhjaimet(); 
     251        SeuraavaKentta(kenttaNro); 
    231252    } 
    232253} 
  • 2012/24/LeeviL/Rangoneina/Rangoneina/Rangoneina/Rangoneina.csproj.Debug.cachefile

    r3016 r3018  
    77Content\Kentta1.xnb 
    88Content\Kentta2.xnb 
     9Content\Kentta3.xnb 
    910Content\Kentta1.txt 
  • 2012/24/LeeviL/Rangoneina/Rangoneina/Rangoneina/obj/x86/Debug/ContentPipeline-{43DDB7A9-921D-4BF9-A5DD-4CA1D9C85B38}.xml

    r3016 r3018  
    6363      <Options>None</Options> 
    6464      <Output>C:\MyTemp\LeeviL2\Rangoneina\Rangoneina\Rangoneina\bin\x86\Debug\Content\Kentta1.xnb</Output> 
    65       <Time>2012-06-14T10:40:11.2096025+03:00</Time> 
     65      <Time>2012-06-14T13:09:40.9164614+03:00</Time> 
    6666    </Item> 
    6767    <Item> 
     
    7272      <Options>None</Options> 
    7373      <Output>C:\MyTemp\LeeviL2\Rangoneina\Rangoneina\Rangoneina\bin\x86\Debug\Content\Kentta2.xnb</Output> 
    74       <Time>2012-06-14T10:46:41.9170607+03:00</Time> 
     74      <Time>2012-06-14T13:16:10.9954614+03:00</Time> 
     75    </Item> 
     76    <Item> 
     77      <Source>Kentta3.txt</Source> 
     78      <Name>Kentta3</Name> 
     79      <Importer>TextFileImporter</Importer> 
     80      <Processor>TextFileContentProcessor</Processor> 
     81      <Options>None</Options> 
     82      <Output>C:\MyTemp\LeeviL2\Rangoneina\Rangoneina\Rangoneina\bin\x86\Debug\Content\Kentta3.xnb</Output> 
     83      <Time>2012-06-14T13:16:10.8334614+03:00</Time> 
    7584    </Item> 
    7685    <BuildSuccessful>true</BuildSuccessful> 
  • 2012/24/LeeviL/Rangoneina/Rangoneina/Rangoneina/obj/x86/Debug/Rangoneina.csproj.FileListAbsolute.txt

    r3016 r3018  
    3232C:\MyTemp\LeeviL2\Rangoneina\Rangoneina\Rangoneina\obj\x86\Debug\Rangoneina.pdb 
    3333C:\MyTemp\LeeviL2\Rangoneina\Rangoneina\Rangoneina\bin\x86\Debug\Content\Kentta2.xnb 
     34C:\MyTemp\LeeviL2\Rangoneina\Rangoneina\Rangoneina\bin\x86\Debug\Content\Kentta3.xnb 
  • 2012/24/LeeviL/Rangoneina/Rangoneina/Rangoneina/obj/x86/Debug/cachefile-{43DDB7A9-921D-4BF9-A5DD-4CA1D9C85B38}-targetpath.txt

    r3016 r3018  
    77Content\Kentta1.xnb 
    88Content\Kentta2.xnb 
     9Content\Kentta3.xnb 
    910Content\Kentta1.txt 
  • 2012/24/LeeviL/Rangoneina/Rangoneina/RangoneinaContent/Kentta2.txt

    r3016 r3018  
    11====================================================================================================================== 
    2 ================           =========================================================================================== 
     2================           =                                                                                         = 
    33==                         =========================================================================================== 
    4 ==                =======  ================                                                                         == 
    5 ==   ==========   =     =  ================                                                                         == 
    6 ==  ==        ==  =  =  =  ================  ======  ====================  ============                             == 
    7 ==  ==  ====  ==  =  ====  ================  ======  ====================  ============                             == 
    8 ==  ========  ==  =        ================  ==      ==============        ============                             == 
    9 ==            ==  =        ================  ==      ==============        ============                             == 
     4==    R           =======  =              =                                                                         == 
     5==   ========== 3 =    W=  =              =                3                                                        == 
     6==  ==        ==  =     =  =              =  ======  ====================  ============                             == 
     7==  ==T       ==  =  ====  =              =  ======  ====================  ============                             == 
     8==  ========  ==  =        =              =  ==T   T ==============        ============                             == 
     9==            ==  =        =              =  ==      ==============        ============                   M M       == 
    1010==            ==  =========================  ==  ==================  ==================                             == 
    11 ================  =========================  ==  ==================  ==================                             == 
    12 ================  =========================  ==  ==================  ==================                             == 
    13 ================  =========================  ==  ==================  ==================                             == 
    14 ================  =========================  ==         ======       ==================                             == 
    15 ================  =========================  ==         ======       ==================                             == 
    16 ================  =========================  ==========================================                             == 
    17 ==  =======              ==================                                       =====                             == 
    18 ==  =======              ==================                                       =====                             == 
     11================  =                       =  ==  ==================  ==================                             == 
     12================  =                       =  ==  ==================  ==================        M                    == 
     13================  =                       =  ==  ==================  ==================                             == 
     14================  =                       =  ==      W  ======M      ==================              M              == 
     15================  =                       =  ==         ======M      ==================                             == 
     16================  =========================  ==========================================          M                  == 
     17== W=======              ==================                                       =====                             == 
     18==  ======= 3            ==================                            2          =====                             == 
    1919==           ===  =====  =======================================================  =====                             == 
    20 ==           ===  =====  =======================================================  =====                             == 
    21 ================  =====  ======                                 ================  =====                             == 
    22 ================  =====  ======                                 ================  =====                             == 
    23 ================  =====  ======  =============================  ================  =====                             == 
    24 ==========  ====  =====  ======  =============================  ================  =====                             == 
    25 ==========  ====  =====  ======  =============================  ================  =====                             == 
    26 ==========        =====  ======  =============================  ================  =====                             == 
    27 ==========        =====  ======  =============================  ================  =====                             == 
    28 =====================    ======  =============================  ================  =====                             == 
    29 ==  =================    ======  =============================  ================  =====                             == 
    30 ==  =================  ========  =============================  ================  =====                             == 
    31 ==                     ========  =============================  ================  =====                             == 
    32 ==                     ========  =============================  ================  =====                             == 
    33 ======  =============  ========  =============================  ================  =====                             == 
    34 ======  =============  ========  =============================  ================  =====                             == 
    35 ======  =============                    =====================  ================  =====                             == 
    36 =====================                    =====================  ================  =====                             == 
    37 =============================    =============================  ================  =====                             == 
    38 =============================    ======================         ================  =====                             == 
    39 =============================  ========================         ================  =====                             == 
    40 =============================  ========================  =======================  ==================================== 
    41 =======                   =============================  =======================  ==================================== 
    42 =======                   =============================  =======================  ==================================== 
    43 =======  ===============  =============================  =======================  ==================================== 
    44 =======  ======  =======  =============================  =======================  ==================================== 
    45 =======  ======  =======  =============================  =======================  ==================================== 
    46 =======  ===         ===  =============================  =======================  ==================================== 
    47 =======  ===         ===  =============================  =======================  ==================================== 
    48 =======  ======  =======  =============================  =======================  ==================================== 
    49 =======  ======  =======  =============================  =======================  ==================================== 
    50 =======  ======  =======                                 =======================  ==================================== 
    51 =======  ======  =======                                 =======================  ==================================== 
    52 =======  ======  ===============================================================  ==================================== 
    53 =======                                                                           ==================================== 
    54 =======                                                                           ==================================== 
     20==           ===  =====  ========================================              =  =====        M                    == 
     21================  =====  ======1                                =              =  =====                             == 
     22================  =====  ======                                 =              =  =====                             == 
     23================  =====  ======  =============================  =              =  =====                             == 
     24==========M====   =====  ======  =                           =  =              =  =====             M              == 
     25==========  ====  =====  ======  =                           =  =              =  =====                             == 
     26==========        =====  ======  =                           =  =              =  =====                             == 
     27==========  M     =====  ======  =                           =  =              = 3=====                             == 
     28=====================    ======  =                           =  =              =  =====                             == 
     29== W=================    ======  =                           =  =              =  =====          M       M          == 
     30==  =================  ========  =                           =  =              =  =====                             == 
     31==           2         ========  =                           =  =              =  =====                             == 
     32==                     ========  =                           =  =              =  =====                             == 
     33======  =============  ========  =                           =  =              =  =====                             == 
     34======  =============  ========  =============================  =              =  =====                             == 
     35======T =============                    =                   =  =              =  =====     M                       == 
     36=====================              2    T=                   =  =              =  =====           S                 == 
     37=============================    =========            ========  =              =  =====                             == 
     38=============================   M=                    =  3      =              =  =====                             == 
     39=============================  ===                    =         =              =  =====                             == 
     40============================= M=                      =  =======================  ==================================== 
     41=======   T               ======                      =  =                     =  =                                  = 
     42=======                   =                           =  =                     =  =                                  = 
     43=======  ===============  =                           =  =                     =  =                                  = 
     44=======  ====== T=======  =                           =  =                     =  =                                  = 
     45=======  ======  =======  =                           =  =                     =  =                                  = 
     46=======  ===M        ===  =                           =  =                     =  =                                  = 
     47=======  ===        T===  =                           =  =                     =  =                                  = 
     48=======  ======  =======  =                           =  =                     =  =                                  = 
     49=======  ======  =======  =============================  =                     =  =                                  = 
     50=======  ======  =======                                 =                     =  =                                  = 
     51=======  ======  =======                        3        =                     =  =                                  = 
     52=======  ======  ===============================================================  =                                  = 
     53=======     1                                  2                   3              =                                  = 
     54=======                                                                           =                                  = 
    5555====================================================================================================================== 
    56 ====================================================================================================================== 
     56                                                                                                                         
  • 2012/24/LeeviL/Rangoneina/Rangoneina/RangoneinaContent/RangoneinaContent.contentproj

    r3016 r3018  
    101101    </Compile> 
    102102  </ItemGroup> 
     103  <ItemGroup> 
     104    <Compile Include="Kentta3.txt"> 
     105      <Name>Kentta3</Name> 
     106      <Importer>TextFileImporter</Importer> 
     107      <Processor>TextFileContentProcessor</Processor> 
     108    </Compile> 
     109  </ItemGroup> 
    103110  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    104111  <!--  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.