Changeset 8125 for 2016


Ignore:
Timestamp:
2016-07-26 15:01:45 (3 years ago)
Author:
sieerinn
Message:
 
Location:
2016/30/LukaH
Files:
6 added
13 edited

Legend:

Unmodified
Added
Removed
  • 2016/30/LukaH/Spikemania/Spikemania/Spikemania/Spikemania.cs

    r8113 r8125  
    1313    const int RUUDUN_KOKO = 40; 
    1414 
     15 
     16    Vector spawni = Vector.Zero; 
     17 
    1518    PlatformCharacter pelaaja1; 
    1619 
     20    Image avaimenkuva = LoadImage("avain"); 
     21    Image ovenkuva = LoadImage("ovi"); 
    1722    Image pelaajanKuva = LoadImage("norsu"); 
    1823    Image tahtiKuva = LoadImage("tahti"); 
     
    3944        kentta.SetTileMethod('N', LisaaPelaaja); 
    4045        kentta.SetTileMethod('a', LisaaAvain); 
     46        kentta.SetTileMethod('o', LisaaOvi); 
    4147        kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 
    4248        Level.CreateBorders(); 
     
    4551     
    4652    } 
     53    void LisaaOvi(Vector paikka, double leveys, double korkeus) 
     54    { 
     55        PhysicsObject Ovi = PhysicsObject.CreateStaticObject(leveys, korkeus *2); 
     56        Ovi.IgnoresCollisionResponse = false; 
     57        Ovi.Position = paikka + new Vector(0, korkeus / 2); 
     58        Ovi.Shape = Shape.Rectangle; 
     59        Add(Ovi); 
     60        Ovi.Image = ovenkuva; 
     61    } 
    4762    void LisaaAvain(Vector paikka, double leveys, double korkeus) 
    4863    { 
    4964        PhysicsObject Avain = PhysicsObject.CreateStaticObject(leveys, korkeus); 
    50         Avain.IgnoresCollisionResponse = true; 
     65        Avain.IgnoresCollisionResponse = false; 
    5166        Avain.Position = paikka; 
    52         Avain.Shape = Shape.Diamond; 
     67        Avain.Tag = "Avain"; 
    5368        Add(Avain); 
     69        Avain.Image = avaimenkuva; 
    5470    } 
    5571 
     
    6581    { 
    6682        PhysicsObject Piikki = PhysicsObject.CreateStaticObject(leveys, korkeus); 
    67         Piikki.IgnoresCollisionResponse = true; 
     83        Piikki.IgnoresCollisionResponse = false; 
    6884        Piikki.Position = paikka; 
    6985        Piikki.Shape = Shape.Triangle; 
     86        Piikki.Color = Color.LightGray; 
    7087        Piikki.Tag = "Piikki"; 
    7188        Add(Piikki); 
     
    7693        pelaaja1 = new PlatformCharacter(leveys, korkeus); 
    7794        pelaaja1.Position = paikka; 
     95        spawni = paikka; 
    7896        pelaaja1.Mass = 4.0; 
    7997        pelaaja1.Image = pelaajanKuva; 
    80         AddCollisionHandler(pelaaja1, "tahti", TormaaTahteen); 
     98        //AddCollisionHandler(pelaaja1, "tahti", TormaaTahteen); 
     99        AddCollisionHandler(pelaaja1, "Piikki", TormaaPiikkiin); 
    81100        Add(pelaaja1); 
     101 
    82102    } 
     103    void TormaaPiikkiin(PhysicsObject Pelaaja1, PhysicsObject Piikki) 
     104    { 
     105        Pelaaja1.Position = spawni; 
     106    } 
     107    
    83108 
    84109    void LisaaNappaimet() 
  • 2016/30/LukaH/Spikemania/Spikemania/Spikemania/Spikemania.csproj.Debug.cachefile

    r8113 r8125  
    33Content\tahti.xnb 
    44Content\kentta1.xnb 
     5Content\testi.xnb 
    56Content\Level1.xnb 
    6 Content\testi.xnb 
     7Content\ovi.xnb 
     8Content\avain.xnb 
    79Content\kentta1.txt 
  • 2016/30/LukaH/Spikemania/Spikemania/Spikemania/obj/x86/Debug/ContentPipeline-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}.xml

    r8113 r8125  
    99      <Options>None</Options> 
    1010      <Output>C:\MyTemp\LukaH\Spikemania\Spikemania\Spikemania\bin\x86\Debug\Content\maali.xnb</Output> 
    11       <Time>2016-07-26T10:33:54.7153805+03:00</Time> 
     11      <Time>2016-07-26T13:31:59.2284023+03:00</Time> 
    1212    </Item> 
    1313    <Item> 
     
    1818      <Options>None</Options> 
    1919      <Output>C:\MyTemp\LukaH\Spikemania\Spikemania\Spikemania\bin\x86\Debug\Content\norsu.xnb</Output> 
    20       <Time>2016-07-26T10:33:54.7163805+03:00</Time> 
     20      <Time>2016-07-26T13:31:59.3064028+03:00</Time> 
    2121    </Item> 
    2222    <Item> 
     
    2727      <Options>None</Options> 
    2828      <Output>C:\MyTemp\LukaH\Spikemania\Spikemania\Spikemania\bin\x86\Debug\Content\tahti.xnb</Output> 
    29       <Time>2016-07-26T10:33:54.7183805+03:00</Time> 
     29      <Time>2016-07-26T13:31:59.3688032+03:00</Time> 
    3030    </Item> 
    3131    <Item> 
     
    3636      <Options>None</Options> 
    3737      <Output>C:\MyTemp\LukaH\Spikemania\Spikemania\Spikemania\bin\x86\Debug\Content\kentta1.xnb</Output> 
    38       <Time>2016-07-26T10:33:54.7113805+03:00</Time> 
     38      <Time>2016-07-26T13:31:59.2284023+03:00</Time> 
     39    </Item> 
     40    <Item> 
     41      <Source>testi.txt</Source> 
     42      <Name>testi</Name> 
     43      <Importer>TextFileImporter</Importer> 
     44      <Processor>TextFileContentProcessor</Processor> 
     45      <Options>None</Options> 
     46      <Output>C:\MyTemp\LukaH\Spikemania\Spikemania\Spikemania\bin\x86\Debug\Content\testi.xnb</Output> 
     47      <Time>2016-07-26T13:31:59.2440024+03:00</Time> 
    3948    </Item> 
    4049    <Item> 
     
    4554      <Options>None</Options> 
    4655      <Output>C:\MyTemp\LukaH\Spikemania\Spikemania\Spikemania\bin\x86\Debug\Content\Level1.xnb</Output> 
    47       <Time>2016-07-26T11:24:48.9698212+03:00</Time> 
     56      <Time>2016-07-26T14:35:09.342363+03:00</Time> 
    4857    </Item> 
    4958    <Item> 
    50       <Source>testi.txt</Source> 
    51       <Name>testi</Name> 
    52       <Importer>TextFileImporter</Importer> 
    53       <Processor>TextFileContentProcessor</Processor> 
     59      <Source>ovi.png</Source> 
     60      <Name>ovi</Name> 
     61      <Importer>TextureImporter</Importer> 
     62      <Processor>TextureProcessor</Processor> 
    5463      <Options>None</Options> 
    55       <Output>C:\MyTemp\LukaH\Spikemania\Spikemania\Spikemania\bin\x86\Debug\Content\testi.xnb</Output> 
    56       <Time>2016-07-26T11:17:37.3855044+03:00</Time> 
     64      <Output>C:\MyTemp\LukaH\Spikemania\Spikemania\Spikemania\bin\x86\Debug\Content\ovi.xnb</Output> 
     65      <Time>2016-07-26T14:47:34.2506544+03:00</Time> 
     66    </Item> 
     67    <Item> 
     68      <Source>avain.png</Source> 
     69      <Name>avain</Name> 
     70      <Importer>TextureImporter</Importer> 
     71      <Processor>TextureProcessor</Processor> 
     72      <Options>None</Options> 
     73      <Output>C:\MyTemp\LukaH\Spikemania\Spikemania\Spikemania\bin\x86\Debug\Content\avain.xnb</Output> 
     74      <Time>2016-07-26T14:56:00.0775716+03:00</Time> 
    5775    </Item> 
    5876    <BuildSuccessful>true</BuildSuccessful> 
     
    103121      <Assembly> 
    104122        <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> 
    105         <Value>2015-09-16T19:44:22.3998734+03:00</Value> 
     123        <Value>2015-09-16T12:49:20.0687193+03:00</Value> 
    106124      </Assembly> 
    107125    </Assemblies> 
  • 2016/30/LukaH/Spikemania/Spikemania/Spikemania/obj/x86/Debug/Spikemania.csproj.FileListAbsolute.txt

    r8113 r8125  
    1414C:\MyTemp\LukaH\Spikemania\Spikemania\Spikemania\bin\x86\Debug\Content\kentta1.txt 
    1515C:\MyTemp\LukaH\Spikemania\Spikemania\Spikemania\bin\x86\Debug\Content\testi.xnb 
     16C:\MyTemp\LukaH\Spikemania\Spikemania\Spikemania\bin\x86\Debug\Content\ovi.xnb 
     17C:\MyTemp\LukaH\Spikemania\Spikemania\Spikemania\bin\x86\Debug\Content\avain.xnb 
  • 2016/30/LukaH/Spikemania/Spikemania/Spikemania/obj/x86/Debug/cachefile-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}-targetpath.txt

    r8113 r8125  
    33Content\tahti.xnb 
    44Content\kentta1.xnb 
     5Content\testi.xnb 
    56Content\Level1.xnb 
    6 Content\testi.xnb 
     7Content\ovi.xnb 
     8Content\avain.xnb 
    79Content\kentta1.txt 
  • 2016/30/LukaH/Spikemania/Spikemania/SpikemaniaContent/Level1.txt

    r8113 r8125  
    11#...... 
    2 #..t... 
     2#..a... 
    33#######.......................# 
    4 .......#......................# 
     4.......#p.....................# 
    55........#..................o..# 
    66.........#............######### 
    77.....................#........# 
    8 ..........#...#.....#.........# 
    9 ..N..p...#ppppp#........pp..t.# 
     8..........#.....#...#.........# 
     9..N..p...#ppppppp#.......p..a.# 
    1010############################### 
  • 2016/30/LukaH/Spikemania/Spikemania/SpikemaniaContent/SpikemaniaContent.contentproj

    r8113 r8125  
    8282    </Compile> 
    8383  </ItemGroup> 
     84  <ItemGroup> 
     85    <Compile Include="ovi.png"> 
     86      <Name>ovi</Name> 
     87      <Importer>TextureImporter</Importer> 
     88      <Processor>TextureProcessor</Processor> 
     89    </Compile> 
     90  </ItemGroup> 
     91  <ItemGroup> 
     92    <Compile Include="avain.png"> 
     93      <Name>avain</Name> 
     94      <Importer>TextureImporter</Importer> 
     95      <Processor>TextureProcessor</Processor> 
     96    </Compile> 
     97  </ItemGroup> 
    8498  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    8599  <!--  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.