Changeset 7955


Ignore:
Timestamp:
2016-07-07 14:56:26 (3 years ago)
Author:
pepihlaj
Message:
 
Location:
2016/27/PekkaP
Files:
6 added
13 edited

Legend:

Unmodified
Added
Removed
  • 2016/27/PekkaP/FinnishTroops/FinnishTroops/FinnishTroops/FinnishTroops.cs

    r7949 r7955  
    2323    IntMeter PelaajanElamat; 
    2424    Image Tankki = LoadImage("Tankki"); 
     25    ExplosionSystem rajahdys = 
     26  new ExplosionSystem(LoadImage("rajahdys_kuva"), 1); 
     27    MessageWindow Gameover; 
     28    MessageWindow TheEndForNow; 
     29    Image TeleporttausPalikka = LoadImage("Teleporttaus palikka"); 
    2530    public override void Begin() 
    2631    { 
     32 
     33        ClearAll(); 
     34 
    2735        Gravity = new Vector(0, -1000); 
    2836 
     
    4654        kentta.SetTileMethod('M', LisaaPahis); 
    4755        kentta.SetTileMethod('T', LisaaTyyppi); 
     56        kentta.SetTileMethod('=', LuoLoppu); 
    4857        kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 
    4958        Level.CreateBorders(); 
     
    7382 
    7483        pahis.Weapon = new AssaultRifle(30, 10); 
     84        pahis.Weapon.CanHitOwner = false; 
    7585        pahis.Weapon.ProjectileCollision = AmmusOsui; 
    7686        Timer ajastin = new Timer(); 
     
    99109 
    100110        tyyppi.Weapon = new AssaultRifle(30, 10); 
     111        tyyppi.Weapon.CanHitOwner = false; 
    101112        tyyppi.Weapon.IsVisible = false; 
    102113        tyyppi.Weapon.AmmoIgnoresGravity = false; 
     
    110121    } 
    111122 
     123    void LuoLoppu(Vector paikka, double leveys, double korkeus) 
     124    { 
     125        PhysicsObject loppupalikka = new PhysicsObject(leveys, korkeus); 
     126        loppupalikka.Position = paikka; 
     127        loppupalikka.Image = TeleporttausPalikka; 
     128        AddCollisionHandler(pelaaja1, loppupalikka, tormaaloppuun); 
     129        Add(loppupalikka); 
     130    } 
     131    void tormaaloppuun(PhysicsObject pelaaja1, PhysicsObject loppupalikka) 
     132    { 
     133        TheEndForNow = new MessageWindow("The End For Now :D I'll be back"); 
     134        Add(TheEndForNow); 
     135    } 
    112136    void LisaaTaso(Vector paikka, double leveys, double korkeus) 
    113137    { 
     
    167191    void KranaattiOsui(IPhysicsObject rajahdyksenKohde, Vector v) 
    168192    { 
    169         if (rajahdyksenKohde.Tag.Equals("PahisSotilas") || rajahdyksenKohde.Tag.Equals("pelaaja1") || rajahdyksenKohde.Tag.Equals("Tankki")) rajahdyksenKohde.Destroy(); 
     193        if (rajahdyksenKohde.Tag.Equals("PahisSotilas") || rajahdyksenKohde.Tag.Equals("pelaaja1") || rajahdyksenKohde.Tag.Equals("Tankki")) 
     194        { 
     195            rajahdyksenKohde.Destroy(); 
     196            if (rajahdyksenKohde == pelaaja1) 
     197            { 
     198                Gameover = new MessageWindow("Hävisit pelin"); 
     199                Add(Gameover); 
     200                Timer.SingleShot(5, Begin); 
     201            } 
     202        } 
    170203    } 
    171204 
     
    238271                { 
    239272                    pelaaja1.Destroy(); 
     273                    Gameover = new MessageWindow("Hävisit pelin"); 
     274                    Add(Gameover); 
     275                    Timer.SingleShot(5, Begin); 
    240276                } 
    241277            } 
  • 2016/27/PekkaP/FinnishTroops/FinnishTroops/FinnishTroops/FinnishTroops.csproj.Debug.cachefile

    r7949 r7955  
    1010Content\Palikka.xnb 
    1111Content\Tankki.xnb 
     12Content\Teleporttaus palikka.xnb 
  • 2016/27/PekkaP/FinnishTroops/FinnishTroops/FinnishTroops/obj/x86/Debug/ContentPipeline-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}.xml

    r7949 r7955  
    4545      <Options>None</Options> 
    4646      <Output>C:\MyTemp\PekkaP\FinnishTroops\FinnishTroops\FinnishTroops\bin\x86\Debug\Content\kentta1.xnb</Output> 
    47       <Time>2016-07-07T13:07:00.4214874+03:00</Time> 
     47      <Time>2016-07-07T14:47:12.8790656+03:00</Time> 
    4848    </Item> 
    4949    <Item> 
     
    101101      <Time>2016-07-07T13:23:03.7247048+03:00</Time> 
    102102    </Item> 
     103    <Item> 
     104      <Source>Teleporttaus palikka.png</Source> 
     105      <Name>Teleporttaus palikka</Name> 
     106      <Importer>TextureImporter</Importer> 
     107      <Processor>TextureProcessor</Processor> 
     108      <Options>None</Options> 
     109      <Output>C:\MyTemp\PekkaP\FinnishTroops\FinnishTroops\FinnishTroops\bin\x86\Debug\Content\Teleporttaus palikka.xnb</Output> 
     110      <Time>2016-07-07T14:37:16.8411931+03:00</Time> 
     111    </Item> 
    103112    <BuildSuccessful>true</BuildSuccessful> 
    104113    <Settings> 
  • 2016/27/PekkaP/FinnishTroops/FinnishTroops/FinnishTroops/obj/x86/Debug/FinnishTroops.csproj.FileListAbsolute.txt

    r7949 r7955  
    1818C:\MyTemp\PekkaP\FinnishTroops\FinnishTroops\FinnishTroops\bin\x86\Debug\Content\Palikka.xnb 
    1919C:\MyTemp\PekkaP\FinnishTroops\FinnishTroops\FinnishTroops\bin\x86\Debug\Content\Tankki.xnb 
     20C:\MyTemp\PekkaP\FinnishTroops\FinnishTroops\FinnishTroops\bin\x86\Debug\Content\Teleporttaus palikka.xnb 
  • 2016/27/PekkaP/FinnishTroops/FinnishTroops/FinnishTroops/obj/x86/Debug/cachefile-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}-targetpath.txt

    r7949 r7955  
    1010Content\Palikka.xnb 
    1111Content\Tankki.xnb 
     12Content\Teleporttaus palikka.xnb 
  • 2016/27/PekkaP/FinnishTroops/FinnishTroops/FinnishTroopsContent/FinnishTroopsContent.contentproj

    r7949 r7955  
    116116    </Compile> 
    117117  </ItemGroup> 
     118  <ItemGroup> 
     119    <Compile Include="Teleporttaus palikka.png"> 
     120      <Name>Teleporttaus palikka</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/27/PekkaP/FinnishTroops/FinnishTroops/FinnishTroopsContent/kentta1.txt

    r7949 r7955  
    1 #...................................................#....# 
    2 #...............................M........................# 
    3 #..........#.............#M............##...........#..**# 
    4 #.........###...........###.M.........###.M...M.....#..**# 
     1#..#.............................M..................#....# 
     2#.##.....................M...............................# 
     3#..........#.............#.............##...........#..**# 
     4#.........###....M......###...........###..T....T...#..**# 
    55#####################################################..### 
    66#........................................................# 
    7 #........................................................# 
     7#.........T..............................................# 
    88#.......##########.......................................# 
    99#......##********##..............#....########....#......# 
    10 #.....##MMMMMM...................#.....M...M......#......# 
     10#.....##T........................#.T...T..........#......# 
    1111###..##################################################### 
    12 #........................................................# 
    13 #......*.....*....*....*.....*....*.....*....*...........# 
    14 #.....##....##...##...##....##...##....##...##...........# 
    15 #........................................................# 
    16 #........................................................# 
     12#......#.....#........#......#........#.......#..........# 
     13#......#.....#........#*.....#........#.......#..........# 
     14#......*.....*........*......*...*....*.......*..........# 
     15#......#.....#........#......#...#....#.......#.....#..#*# 
     16#......#M....#..M.....#.M....#.M.#.M..#...M...#..M..#..#*# 
    1717#####################################################..### 
    18 #........................................................# 
    19 #........................................................# 
    20 #........................................................# 
    21 #........................................................# 
    22 #....N.......................T...........................# 
     18=........................................................# 
     19=............................ ...........................# 
     20=...........N........................................    # 
     21=........................................................# 
     22=......T T T T T .  T T T T T T T T T .T T T .T T T T T .# 
    2323########################################################## 
    2424 
Note: See TracChangeset for help on using the changeset viewer.