Changeset 7336


Ignore:
Timestamp:
2016-06-15 14:57:04 (7 years ago)
Author:
majuvika
Message:
 
Location:
2016/24/MattiK/ZlandZ
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • 2016/24/MattiK/ZlandZ/ZlandZ/ZlandZ/ZlandZ.cs

    r7291 r7336  
    1515    PlatformCharacter Leaf; 
    1616    PlatformCharacter Sombombo; 
     17    PlatformCharacter Orkki; 
     18 
     19    LaserGun LeafinAse; 
    1720 
    1821    Image pelaajanKuva = LoadImage("lintu"); 
     22    Image orkki = LoadImage("orkki"); 
    1923    Image GuninKuva = LoadImage("gun"); 
    2024    Image BossinKuva = LoadImage("Boss"); 
     
    3034 
    3135        LuoKentta(); 
    32          
     36 
    3337        LisaaNappaimet(); 
    3438        LuoAmmusLaskuri(); 
     
    4650        kentta.SetTileMethod('#', LisaaTaso); 
    4751        kentta.SetTileMethod('G', Lisaagun); 
     52        kentta.SetTileMethod('O', LisaaOrkki); 
    4853        kentta.SetTileMethod('B', LisaaBoss); 
    4954        kentta.SetTileMethod('b', LisaaBox); 
     
    5459        Level.CreateBorders(); 
    5560        Level.Background.CreateGradient(Color.Black, Color.Red); 
    56          
    57     } 
    58  
    59  
    60         void LisaaTaso(Vector paikka, double leveys, double korkeus) 
     61 
     62    } 
     63 
     64 
     65    void LisaaTaso(Vector paikka, double leveys, double korkeus) 
    6166    { 
    6267        PhysicsObject taso = PhysicsObject.CreateStaticObject(leveys, korkeus); 
     
    7681    void LisaaBoss(Vector paikka, double leveys, double korkeus) 
    7782    { 
    78         PlatformCharacter Boss =new PlatformCharacter(leveys, korkeus); 
     83        PlatformCharacter Boss = new PlatformCharacter(leveys, korkeus); 
    7984        Boss.Position = paikka; 
    8085        Add(Boss); 
     
    8792        Boss.Brain = tasoAivot; 
    8893    } 
     94    void LisaaOrkki(Vector paikka, double leveys, double korkeus) 
     95    { 
     96        PlatformCharacter Orkki = new PlatformCharacter(200, 200); 
     97        Orkki.Position = paikka; 
     98        Add(Orkki); 
     99        Orkki.Image = orkki; 
     100        Orkki.Tag = "pahis"; 
     101        PlatformWandererBrain tasoAivot = new PlatformWandererBrain(); 
     102        tasoAivot.Speed = 50; 
     103        tasoAivot.Active = true; 
     104 
     105        Orkki.Brain = tasoAivot; 
     106    } 
    89107    IntMeter ammusLaskuri; 
    90108 
     
    122140        Sombombo.Position = paikka; 
    123141 
    124         
     142 
    125143 
    126144        PlatformWandererBrain tasoAivot = new PlatformWandererBrain(); 
     
    129147        Sombombo.Brain = tasoAivot; 
    130148    } 
     149 
    131150    void Lisaagun(Vector paikka, double leveys, double korkeus) 
    132151    { 
    133         PhysicsObject gun = new PhysicsObject(leveys, korkeus); 
     152        PhysicsObject gun = PhysicsObject.CreateStaticObject(leveys, korkeus); 
     153        //gun.IgnoresCollisionResponse = true; 
     154        gun.Position = paikka; 
     155        gun.Image = GuninKuva; 
     156        gun.Tag = "gun"; 
    134157        Add(gun); 
    135         gun.Image = LoadImage("gun"); 
    136         gun.Tag = "gun"; 
    137         gun.Position = paikka; 
    138     } 
    139  
    140  
    141  
    142         void LisaaPelaaja(Vector paikka, double leveys, double korkeus) 
     158    } 
     159 
     160 
     161 
     162    void LisaaPelaaja(Vector paikka, double leveys, double korkeus) 
    143163    { 
    144164        Leaf = new PlatformCharacter(leveys, korkeus); 
     
    147167        Leaf.Image = pelaajanKuva; 
    148168        AddCollisionHandler(Leaf, "Box", TormaaTahteen); 
     169        AddCollisionHandler(Leaf, "gun", TormaaGuniin); 
    149170        AddCollisionHandler(Leaf, "pahis", TormaaVihuun); 
    150171        AddCollisionHandler(Leaf, "piikki", TormaaPiikkiin); 
     
    174195        if (ammus != null) 
    175196        { 
    176             
     197 
    177198            //ammus.Size *= 3; 
    178199            //ammus.Image = ... 
     
    202223        ControllerOne.Listen(Button.A, ButtonState.Pressed, Hyppaa, "Pelaaja hyppää", Leaf, hyppyNopeus); 
    203224 
    204         PhoneBackButton.Listen(ConfirmExit, "Lopeta peli"); 
     225 
     226 
    205227    } 
    206228 
     
    228250        hahmo.Destroy(); 
    229251    } 
    230      void TormaaPiikkiin(PhysicsObject hahmo, PhysicsObject piikki) 
     252    void TormaaOrkkiin(PhysicsObject hahmo, PhysicsObject orkki) 
    231253    { 
    232254        maaliAani.Play(); 
     
    234256        hahmo.Destroy(); 
    235257    } 
     258    void TormaaGiantiin(PhysicsObject hahmo, PhysicsObject Giant) 
     259    { 
     260        maaliAani.Play(); 
     261        MessageDisplay.Add("You died"); 
     262        Giant.Destroy(); 
     263    } 
     264    void TormaaPiikkiin(PhysicsObject hahmo, PhysicsObject piikki) 
     265    { 
     266        maaliAani.Play(); 
     267        MessageDisplay.Add("You died"); 
     268        hahmo.Destroy(); 
     269    } 
     270    void TormaaGuniin(PhysicsObject hahmo, PhysicsObject gun) 
     271    { 
     272        maaliAani.Play(); 
     273        MessageDisplay.Add("Keräsit Aseen!"); 
     274        gun.Destroy(); 
     275 
     276        Leaf.Weapon = new PlasmaCannon(20, 5); 
     277        Leaf.Weapon.Ammo.Value = 60; 
     278        Leaf.Weapon.FireRate = 1; 
     279        Leaf.Weapon.ProjectileCollision = AmmusOsui; 
     280    } 
     281 
    236282} 
  • 2016/24/MattiK/ZlandZ/ZlandZ/ZlandZ/ZlandZ.csproj.Debug.cachefile

    r7291 r7336  
    1010Content\Jump17.xnb 
    1111Content\gun.xnb 
     12Content\orkki.xnb 
  • 2016/24/MattiK/ZlandZ/ZlandZ/ZlandZ/obj/x86/Debug/ContentPipeline-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}.xml

    r7291 r7336  
    3636      <Options>None</Options> 
    3737      <Output>C:\MyTemp\MattiK\ZlandZ\ZlandZ\ZlandZ\bin\x86\Debug\Content\kentta1.xnb</Output> 
    38       <Time>2016-06-14T14:52:07.8748476+03:00</Time> 
     38      <Time>2016-06-15T14:40:38.3402243+03:00</Time> 
    3939    </Item> 
    4040    <Item> 
     
    101101      <Time>2016-06-14T14:34:19.1299838+03:00</Time> 
    102102    </Item> 
     103    <Item> 
     104      <Source>orkki.png</Source> 
     105      <Name>orkki</Name> 
     106      <Importer>TextureImporter</Importer> 
     107      <Processor>TextureProcessor</Processor> 
     108      <Options>None</Options> 
     109      <Output>C:\MyTemp\MattiK\ZlandZ\ZlandZ\ZlandZ\bin\x86\Debug\Content\orkki.xnb</Output> 
     110      <Time>2016-06-15T13:25:01.0026751+03:00</Time> 
     111    </Item> 
    103112    <BuildSuccessful>true</BuildSuccessful> 
    104113    <Settings> 
  • 2016/24/MattiK/ZlandZ/ZlandZ/ZlandZ/obj/x86/Debug/ZlandZ.csproj.FileListAbsolute.txt

    r7291 r7336  
    1818C:\MyTemp\MattiK\ZlandZ\ZlandZ\ZlandZ\bin\x86\Debug\Content\Jump17.xnb 
    1919C:\MyTemp\MattiK\ZlandZ\ZlandZ\ZlandZ\bin\x86\Debug\Content\gun.xnb 
     20C:\MyTemp\MattiK\ZlandZ\ZlandZ\ZlandZ\bin\x86\Debug\Content\orkki.xnb 
  • 2016/24/MattiK/ZlandZ/ZlandZ/ZlandZ/obj/x86/Debug/cachefile-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}-targetpath.txt

    r7291 r7336  
    1010Content\Jump17.xnb 
    1111Content\gun.xnb 
     12Content\orkki.xnb 
  • 2016/24/MattiK/ZlandZ/ZlandZ/ZlandZContent/ZlandZContent.contentproj

    r7291 r7336  
    116116    </Compile> 
    117117  </ItemGroup> 
     118  <ItemGroup> 
     119    <Compile Include="orkki.png"> 
     120      <Name>orkki</Name> 
     121      <Importer>TextureImporter</Importer> 
     122      <Processor>TextureProcessor</Processor> 
     123    </Compile> 
     124  </ItemGroup> 
    118125  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    119126  <!--  To modify your build process, add your task inside one of the targets below and uncomment it.  
  • 2016/24/MattiK/ZlandZ/ZlandZ/ZlandZContent/kentta1.txt

    r7291 r7336  
    33          
    44          
    5          N 
    65          
    7           
    8                                                                                                                                S S 
    9                                                                                                                               ##### 
    10                                                                                                                                       S 
    11                                                                                                                                      #### 
    12                                                                                                                                              S 
    13                                                                                                                                             ### 
    14                                                                        S  S       bb    S S  S  S S SS SS  S  SS S S                  S 
    15                      S        b            S    S    S    S    S       #######    #######################################    ####   ####   ### 
    16                      ####    ####     ##   ##   ##   ##   ##   ##   # 
    17      
    18           G  b  b  b                       PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP     
    19 ################################################################################################################################################ 
     6################################################################################################################################################################################################ 
     7            
     8                                                                                                                                                                                                     # 
     9                                                                                                                                                                                                                                                                     
     10                                                                                                                                                                                                                                                                                                                      # 
     11 
     12                                                                                                                                                                                           # 
     13                                          b  b                                                  b 
     14                                                                                                                                          S   S                                                                                     # 
     15                                        #  ###  #                   b  b  b                 # P # P #            # #         b    b    b    b 
     16       O       S      S              ##             ##               S  B  S               # P       P #           G          P    P    P    P                #   #   #   #          # 
     17N           ####PPP####            PPP S PPPPPPP S PPP    B      ##P##P##P##P##         # PPPPPPPPPPPPP #        # #         P    P    P    P                # S # S # S #                         
     18############################################################################################################################################################################################################## 
     19                                                                                         
Note: See TracChangeset for help on using the changeset viewer.