Changeset 1634 for 2010


Ignore:
Timestamp:
2010-08-05 15:00:04 (13 years ago)
Author:
ossakama
Message:

pääkkä tehty, vihut ampuu ja kuolee, kivat pommit
ja kuvia.

Location:
2010/31/ossakama
Files:
7 added
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • 2010/31/ossakama/Erskan kostoretki/Content/Content.contentproj

    r1608 r1634  
    6161    </Compile> 
    6262  </ItemGroup> 
     63  <ItemGroup> 
     64    <Compile Include="ryssa.png"> 
     65      <Name>ryssa</Name> 
     66      <Importer>TextureImporter</Importer> 
     67      <Processor>TextureProcessor</Processor> 
     68    </Compile> 
     69  </ItemGroup> 
     70  <ItemGroup> 
     71    <Compile Include="kranu.png"> 
     72      <Name>kranu</Name> 
     73      <Importer>TextureImporter</Importer> 
     74      <Processor>TextureProcessor</Processor> 
     75    </Compile> 
     76  </ItemGroup> 
     77  <ItemGroup> 
     78    <Compile Include="paakka.png"> 
     79      <Name>paakka</Name> 
     80      <Importer>TextureImporter</Importer> 
     81      <Processor>TextureProcessor</Processor> 
     82    </Compile> 
     83  </ItemGroup> 
    6384  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    6485  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.  
  • 2010/31/ossakama/Erskan kostoretki/Peli.cs

    r1608 r1634  
    6565        ruudut['='] = LuoPalikka; 
    6666        ruudut['1'] = LuoErska; 
     67        ruudut['x'] = LuoRyssa; 
     68        ruudut['P'] = LuoPaakka; 
    6769        ruudut.Insert(ruudunLeveys, ruudunKorkeus); 
    6870    } 
     
    8082        erska.X = 0; 
    8183        erska.Y = Level.Bottom + 120; 
    82         erska.Weapon = new LaserGun(80, 20); 
     84        LaserGun laserPyssy = new LaserGun(80, 20); 
     85        laserPyssy.LaserCollision = LaserSadeOsuu; 
     86        erska.Weapon = laserPyssy; 
     87         
    8388        erska.Weapon.Y -= 15; 
    8489 
    8590        return erska; 
    8691    } 
     92    PlatformCharacter LuoRyssa() 
     93    { 
     94        PlatformCharacter ryssa = new PlatformCharacter(90, 120); 
     95        ryssa.Mass = 4.0; 
     96        ryssa.Image = LoadImage("ryssa"); 
     97        ryssa.Tag = "vihu"; 
     98        ryssa.X = 0; 
     99        ryssa.Y = Level.Bottom + 120; 
     100        ryssa.Weapon = new PlasmaCannon(80, 20); 
     101        ryssa.Weapon.Y -= 22; 
     102 
     103        Timer ajastin = new Timer(); 
     104        ajastin.Interval = 9.0; 
     105        ajastin.Trigger += RyssaAmpuu; 
     106        ajastin.Tag = ryssa; 
     107        ajastin.Start(); 
     108 
     109        return ryssa; 
     110    } 
    87111    void HeitaKranaatti() 
    88112    { 
    89         ClusterGrenade kranaatti = new ClusterGrenade(4.0, 4 ); 
    90         kranaatti.X = erska.X + 10; 
    91         kranaatti.Y = erska.Y + 10; 
     113        ClusterGrenade kranaatti = new ClusterGrenade(100.0, 1); 
     114        kranaatti.X = erska.X + 0; 
     115        kranaatti.Y = erska.Y + 0; 
    92116        Add(kranaatti); 
    93         Vector heittoVoima = Vector.FromLengthAndAngle(4000, Angle.Degrees(45)); 
     117        Vector heittoVoima = Vector.FromLengthAndAngle(40000, Angle.Degrees(45)); 
    94118        kranaatti.Hit(heittoVoima); 
    95         kranaatti.NumberOfClusters = 5; 
     119        kranaatti.NumberOfClusters = 1; 
     120        kranaatti.Image = LoadImage("kranu"); 
     121    } 
     122    void RyssaAmpuu( Timer LauennutAjastin ) 
     123    { 
     124        PlatformCharacter ryssa = LauennutAjastin.Tag as PlatformCharacter; 
    96125 
     126        if (ryssa != null) 
     127        { 
     128            ryssa.Weapon.Shoot();  
     129        } 
     130    } 
     131    void LaserSadeOsuu( PhysicsObject Laser, PhysicsObject toinen ) 
     132    { 
     133        if (toinen != erska) 
     134        { 
     135            Laser.Destroy(); 
     136            Explosion rajahdys = new Explosion(4000); 
     137            rajahdys.Position = Laser.Position; 
     138            Add(rajahdys); 
     139            rajahdys.Speed = 2000.0; 
     140            rajahdys.Force = 100000; 
     141            rajahdys.ShockwaveColor = Color.Black; 
     142        } 
     143        if (toinen.Tag.ToString() == "vihu") 
     144        { 
     145            toinen.Destroy(); 
     146        } 
     147 
     148    } 
     149    PlatformCharacter LuoPaakka() 
     150    { 
     151        PlatformCharacter paakka = new PlatformCharacter(90, 120); 
     152        paakka.Mass = 4.0; 
     153        paakka.Image = LoadImage("paakka"); 
     154        paakka.X = 0; 
     155        paakka.Y = Level.Bottom + 120; 
     156        paakka.Weapon = new PlasmaCannon(80, 20); 
     157        paakka.Weapon.Y -= 22; 
     158         
     159        Timer ajastin = new Timer(); 
     160        ajastin.Interval = 0.1; 
     161        ajastin.Trigger += PaakkaAmpuu; 
     162        ajastin.Tag = paakka; 
     163        ajastin.Start(); 
     164 
     165        return paakka; 
     166    } 
     167    void PaakkaAmpuu(Timer LauennutAjastin) 
     168    { 
     169        PlatformCharacter paakka = LauennutAjastin.Tag as PlatformCharacter; 
     170 
     171        if (paakka != null) 
     172        { 
     173            paakka.Weapon.Shoot(); 
     174        } 
    97175    } 
    98176 
  • 2010/31/ossakama/Erskan kostoretki/kentta.txt

    r1608 r1634  
    33=                                                                = 
    44=                                                                = 
    5 =====                                                            = 
    6 =               ==        ==================================     = 
     5=====           x               x   x   x   x   x   x   x        = 
     6=              ==         ==================================     = 
     7=             =           =                                =x    = 
     8=                         =                                ==    = 
    79=                         =                                =     = 
    8 =                         =                                =     = 
    9 =                         =                                =     = 
    10 =      =               ====                 ==             =     = 
    11 =     ==                  =           ==          ==       =     = 
    12 =    ==                   ====       =                     =     = 
    13 =                         =                                =     = 
    14 =                   ==    =                                =     = 
    15 =                         =                                =     = 
     10=     x=               ====                 ==    x        =     = 
     11=     ==                  = x         ==          ==       =    x= 
     12=    ==                   ====       =                     =    == 
     13=                   x     =                                =     = 
     14=                   ==    =                                =x    = 
     15=                         =                                ==    = 
    1616=                         =     =                          =     = 
    17 =======                   =      =                         =     = 
    18 =             ==          =                                =     = 
    19 =                         =             ==             ==  =     = 
    20 =                         =                      ==        =     = 
     17=======        x          =      =                         =     = 
     18=             ==          =                                =    x= 
     19=                         =             ==             ==  =    == 
     20=           x             =                      ==        =     = 
    2121=           ==            =            ==                  =     = 
    22 =                         =                                =     = 
    23 =                      ====      =                         =     = 
    24 =                         =       =          ==            =     = 
     22=                       x =                                =x    = 
     23=                      ====      =                         ==    = 
     24=      x                  =       =          ==            =     = 
    2525=      ==                 =                                =     = 
    26 =                         =            ==                  =     = 
     26=                x        =            ==                  =     = 
    2727=                ==       =                                =     = 
    28 =                         =       ==          ==           =     = 
    29 ===                       =                                =     = 
     28=                         =       ==          ==           =    x= 
     29===                       =                                =    == 
    3030=                         ===                                    = 
    31 = 1                       =                                      = 
     31= x x                 1   =   P                                  = 
    3232=                         =                                      = 
    3333================================================================== 
Note: See TracChangeset for help on using the changeset viewer.