Changeset 6654 for 2015/27/SampoR


Ignore:
Timestamp:
2015-07-01 11:49:22 (8 years ago)
Author:
misakana
Message:

Bomb Squad edistyy.

Location:
2015/27/SampoR/Pommipeli
Files:
3 added
15 edited

Legend:

Unmodified
Added
Removed
  • 2015/27/SampoR/Pommipeli/Pommipeli/Pommipeli/Pommipeli.cs

    r6613 r6654  
    99public class Pommipeli : PhysicsGame 
    1010{ 
    11     const double nopeus = 200; 
    12     const double hyppyNopeus = 750; 
     11    const double nopeus = 250; 
     12    const double hyppyNopeus = 780; 
    1313    const int RUUDUN_KOKO = 40; 
    1414 
     
    1717    Image pelaajanKuva = LoadImage("sotilas"); 
    1818    Image pommiKuva = LoadImage("pommi"); 
     19    Image vihollisenKuva = LoadImage("Vihollinen"); 
    1920 
    2021    SoundEffect maaliAani = LoadSoundEffect("maali"); 
     
    3839        kentta.SetTileMethod('*', LisaaPommi); 
    3940        kentta.SetTileMethod('S', LisaaPelaaja); 
     41        kentta.SetTileMethod('V', LisaaVihollinen); 
    4042        kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 
    4143        Level.CreateBorders(); 
     
    6567        pelaaja1 = new PlatformCharacter(leveys, korkeus); 
    6668        pelaaja1.Position = paikka; 
    67         pelaaja1.Mass = 4.0; 
     69        pelaaja1.Mass = 6.0; 
    6870        pelaaja1.Image = pelaajanKuva; 
    6971        AddCollisionHandler(pelaaja1, "pommi", TormaaPommiin); 
     
    7274        pelaaja1.Weapon = new AssaultRifle(20.0, 20.0); 
    7375        pelaaja1.Weapon.IsVisible = false; 
     76    } 
     77 
     78    void LisaaVihollinen(Vector paikka, double leveys, double korkeus) 
     79    { 
     80        PlatformCharacter vihollinen = new PlatformCharacter(leveys, korkeus); 
     81        vihollinen.Position = paikka; 
     82        vihollinen.Image = vihollisenKuva; 
     83        vihollinen.Tag = "vihollinen"; 
     84        Add(vihollinen); 
    7485    } 
    7586 
     
    115126    void AmmuAseella(AssaultRifle ase) 
    116127    { 
    117         ase.Shoot(); 
     128 
     129        PhysicsObject ammus = ase.Shoot(); 
     130        if (ammus != null) 
     131        { 
     132            ammus.LifetimeLeft = new TimeSpan(0, 0, 2); 
     133            AddCollisionHandler(ammus, delegate(PhysicsObject a, PhysicsObject b) 
     134            { 
     135                a.Destroy(); 
     136            }); 
     137            AddCollisionHandler(ammus, "pommi", TormaaPommiin); 
     138 
     139        } 
     140 
    118141 
    119142 
  • 2015/27/SampoR/Pommipeli/Pommipeli/Pommipeli/Pommipeli.csproj.Debug.cachefile

    r6613 r6654  
    11Content\maali.xnb 
    22Content\tahti.xnb 
    3 Content\kentta1.xnb 
    43Content\pommi.xnb 
    54Content\sotilas.xnb 
     5Content\kentta1.xnb 
     6Content\Vihollinen.xnb 
  • 2015/27/SampoR/Pommipeli/Pommipeli/Pommipeli/obj/x86/Debug/ContentPipeline-{E66DD545-885E-4E0E-8EF2-6E1200871AC7}.xml

    r6613 r6654  
    99      <Options>None</Options> 
    1010      <Output>C:\MyTemp\SampoR\Pommipeli\Pommipeli\Pommipeli\bin\x86\Debug\Content\maali.xnb</Output> 
    11       <Time>2015-06-30T11:04:40.8393338+03:00</Time> 
     11      <Time>2015-07-01T09:54:01.6896541+03:00</Time> 
    1212    </Item> 
    1313    <Item> 
     
    1818      <Options>None</Options> 
    1919      <Output>C:\MyTemp\SampoR\Pommipeli\Pommipeli\Pommipeli\bin\x86\Debug\Content\tahti.xnb</Output> 
    20       <Time>2015-06-30T11:04:40.841334+03:00</Time> 
     20      <Time>2015-07-01T09:54:01.8456441+03:00</Time> 
     21    </Item> 
     22    <Item> 
     23      <Source>pommi.png</Source> 
     24      <Name>pommi</Name> 
     25      <Importer>TextureImporter</Importer> 
     26      <Processor>TextureProcessor</Processor> 
     27      <Options>None</Options> 
     28      <Output>C:\MyTemp\SampoR\Pommipeli\Pommipeli\Pommipeli\bin\x86\Debug\Content\pommi.xnb</Output> 
     29      <Time>2015-07-01T09:54:01.7052531+03:00</Time> 
     30    </Item> 
     31    <Item> 
     32      <Source>sotilas.png</Source> 
     33      <Name>sotilas</Name> 
     34      <Importer>TextureImporter</Importer> 
     35      <Processor>TextureProcessor</Processor> 
     36      <Options>None</Options> 
     37      <Output>C:\MyTemp\SampoR\Pommipeli\Pommipeli\Pommipeli\bin\x86\Debug\Content\sotilas.xnb</Output> 
     38      <Time>2015-07-01T09:54:01.7052531+03:00</Time> 
    2139    </Item> 
    2240    <Item> 
     
    2745      <Options>None</Options> 
    2846      <Output>C:\MyTemp\SampoR\Pommipeli\Pommipeli\Pommipeli\bin\x86\Debug\Content\kentta1.xnb</Output> 
    29       <Time>2015-06-30T14:38:44.938222+03:00</Time> 
     47      <Time>2015-07-01T11:44:18.7293209+03:00</Time> 
    3048    </Item> 
    3149    <Item> 
    32       <Source>pommi.png</Source> 
    33       <Name>pommi</Name> 
     50      <Source>Vihollinen.png</Source> 
     51      <Name>Vihollinen</Name> 
    3452      <Importer>TextureImporter</Importer> 
    3553      <Processor>TextureProcessor</Processor> 
    3654      <Options>None</Options> 
    37       <Output>C:\MyTemp\SampoR\Pommipeli\Pommipeli\Pommipeli\bin\x86\Debug\Content\pommi.xnb</Output> 
    38       <Time>2015-06-30T12:53:31.0375985+03:00</Time> 
    39     </Item> 
    40     <Item> 
    41       <Source>sotilas.png</Source> 
    42       <Name>sotilas</Name> 
    43       <Importer>TextureImporter</Importer> 
    44       <Processor>TextureProcessor</Processor> 
    45       <Options>None</Options> 
    46       <Output>C:\MyTemp\SampoR\Pommipeli\Pommipeli\Pommipeli\bin\x86\Debug\Content\sotilas.xnb</Output> 
    47       <Time>2015-06-30T14:38:00.195646+03:00</Time> 
     55      <Output>C:\MyTemp\SampoR\Pommipeli\Pommipeli\Pommipeli\bin\x86\Debug\Content\Vihollinen.xnb</Output> 
     56      <Time>2015-07-01T11:42:51.9715209+03:00</Time> 
    4857    </Item> 
    4958    <BuildSuccessful>true</BuildSuccessful> 
     
    6675      <Assembly> 
    6776        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.XImporter.dll</Key> 
    68         <Value>2011-09-01T17:22:30+03:00</Value> 
     77        <Value>2011-09-01T16:22:30+03:00</Value> 
    6978      </Assembly> 
    7079      <Assembly> 
    7180        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.VideoImporters.dll</Key> 
    72         <Value>2011-09-01T17:22:30+03:00</Value> 
     81        <Value>2011-09-01T16:22:30+03:00</Value> 
    7382      </Assembly> 
    7483      <Assembly> 
    7584        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.TextureImporter.dll</Key> 
    76         <Value>2011-09-01T17:22:30+03:00</Value> 
     85        <Value>2011-09-01T16:22:30+03:00</Value> 
    7786      </Assembly> 
    7887      <Assembly> 
    7988        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.FBXImporter.dll</Key> 
    80         <Value>2011-09-01T17:22:30+03:00</Value> 
     89        <Value>2011-09-01T16:22:30+03:00</Value> 
    8190      </Assembly> 
    8291      <Assembly> 
    8392        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.EffectImporter.dll</Key> 
    84         <Value>2011-09-01T17:22:30+03:00</Value> 
     93        <Value>2011-09-01T16:22:30+03:00</Value> 
    8594      </Assembly> 
    8695      <Assembly> 
    8796        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.AudioImporters.dll</Key> 
    88         <Value>2011-09-01T17:22:30+03:00</Value> 
     97        <Value>2011-09-01T16:22:30+03:00</Value> 
    8998      </Assembly> 
    9099      <Assembly> 
     
    94103      <Assembly> 
    95104        <Key>C:\Windows\Microsoft.Net\assembly\GAC_32\Microsoft.Xna.Framework.Content.Pipeline\v4.0_4.0.0.0__842cf8be1de50553\Microsoft.Xna.Framework.Content.Pipeline.dll</Key> 
    96         <Value>2012-03-16T14:34:20.6136434+02:00</Value> 
     105        <Value>2012-07-09T09:26:00.6586946+03:00</Value> 
    97106      </Assembly> 
    98107    </Assemblies> 
  • 2015/27/SampoR/Pommipeli/Pommipeli/Pommipeli/obj/x86/Debug/Pommipeli.csproj.FileListAbsolute.txt

    r6613 r6654  
    1212C:\MyTemp\SampoR\Pommipeli\Pommipeli\Pommipeli\bin\x86\Debug\Content\pommi.xnb 
    1313C:\MyTemp\SampoR\Pommipeli\Pommipeli\Pommipeli\bin\x86\Debug\Content\sotilas.xnb 
     14C:\MyTemp\SampoR\Pommipeli\Pommipeli\Pommipeli\bin\x86\Debug\Content\Vihollinen.xnb 
  • 2015/27/SampoR/Pommipeli/Pommipeli/Pommipeli/obj/x86/Debug/cachefile-{E66DD545-885E-4E0E-8EF2-6E1200871AC7}-targetpath.txt

    r6613 r6654  
    11Content\maali.xnb 
    22Content\tahti.xnb 
    3 Content\kentta1.xnb 
    43Content\pommi.xnb 
    54Content\sotilas.xnb 
     5Content\kentta1.xnb 
     6Content\Vihollinen.xnb 
  • 2015/27/SampoR/Pommipeli/Pommipeli/PommipeliContent/PommipeliContent.contentproj

    r6613 r6654  
    7676    </Compile> 
    7777  </ItemGroup> 
     78  <ItemGroup> 
     79    <Compile Include="Vihollinen.png"> 
     80      <Name>Vihollinen</Name> 
     81      <Importer>TextureImporter</Importer> 
     82      <Processor>TextureProcessor</Processor> 
     83    </Compile> 
     84  </ItemGroup> 
    7885  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    7986  <!--  To modify your build process, add your task inside one of the targets below and uncomment it.  
  • 2015/27/SampoR/Pommipeli/Pommipeli/PommipeliContent/kentta1.txt

    r6613 r6654  
    1          * 
    2          ## 
     1        *** 
     2        ### 
    33 
    4        *    * 
    5        ##  ## 
     4   **   *   V 
     5  ###   ##  ## 
    66 
    7      *        * 
    8      ##  ##  ## 
     7 **   **     V* 
     8 ##   ##     ## 
    99 
    10    *    *  *    *      
    11    ##  ##  ##  ## 
     10   *V     **  **      
     11   ##    ##  ##   # 
    1212 
    13  *    *       *   * 
    14  ##  ##  ##  ##  ## 
     13 * * *        *  **  ** 
     14 #   #       ##  ##  ## 
    1515 
    16         S 
    17 ###################### 
     16         S   V 
     17######################## 
Note: See TracChangeset for help on using the changeset viewer.