Ignore:
Timestamp:
2017-06-14 10:13:05 (6 years ago)
Author:
npo17_8
Message:
 
Location:
2017/24/AaroM/TheLegendOfSpikey/TheLegendOfSpikey
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • 2017/24/AaroM/TheLegendOfSpikey/TheLegendOfSpikey/TheLegendOfSpikey/TheLegendOfSpikey.cs

    r8536 r8623  
    1313    const int RUUDUN_KOKO = 40; 
    1414 
    15     PlatformCharacter pelaaja1; 
     15    PlatformCharacter pelaaja1;  
    1616 
    1717    Image pelaajanKuva = LoadImage("norsu"); 
     
    2626        LuoKentta(); 
    2727        LisaaNappaimet(); 
    28  
     28        LisaaTaso(100.0, 0.0); 
     29        LisaaTaso(-100.0, 0.0); 
     30        LisaaTaso(0.0, 100.0); 
     31        LisaaTaso(200.0, 0.0); 
     32        LisaaTaso(0.0, -100.0); 
     33        LisaaTaso(-200.0, 0.0); 
     34        LisaaTaso(0.0, 200.0); 
     35        LisaaTaso(0.0, -200.0); 
     36        LisaaTaso(300, 0.0); 
     37        LisaaTaso(-300, 0.0); 
     38        LisaaTaso(0.0, 300.0); 
     39        LisaaTaso(0.0, -300.0); 
     40        LisaaTaso(400, 0.0); 
     41        LisaaTaso(-400, 0.0); 
     42        LisaaTaso(0.0, 400); 
     43        LisaaTaso(0.0, -400); 
     44        LisaaTaso(100.0, 100.0); 
     45        LisaaTaso(200.0, 200.0); 
     46        LisaaTaso(300.0, 300.0); 
     47        LisaaTaso(400.0, 400.0); 
     48        LisaaTaso(-100.0, 100.0); 
     49        LisaaTaso(-200.0, 200.0); 
     50        LisaaTaso(-300.0, 300.0); 
     51        LisaaTaso(-400.0, 400.0); 
    2952        Camera.Follow(pelaaja1); 
    3053        Camera.ZoomFactor = 1.2; 
     
    3558    { 
    3659        TileMap kentta = TileMap.FromLevelAsset("kentta1"); 
    37         kentta.SetTileMethod('#', LisaaTaso); 
    38         kentta.SetTileMethod('*', LisaaTahti); 
    39         kentta.SetTileMethod('N', LisaaPelaaja); 
    4060        kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 
    4161        Level.CreateBorders(); 
     
    4363    } 
    4464 
    45     void LisaaTaso(Vector paikka, double leveys, double korkeus) 
    46     { 
    47         PhysicsObject taso = PhysicsObject.CreateStaticObject(leveys, korkeus); 
    48         taso.Position = paikka; 
    49         taso.Color = Color.Gray; 
    50         Add(taso); 
    51     } 
    5265 
    53     void LisaaTahti(Vector paikka, double leveys, double korkeus) 
    54     { 
    55         PhysicsObject tahti = PhysicsObject.CreateStaticObject(leveys, korkeus); 
    56         tahti.IgnoresCollisionResponse = true; 
    57         tahti.Position = paikka; 
    58         tahti.Image = tahtiKuva; 
    59         tahti.Tag = "tahti"; 
    60         Add(tahti); 
    61     } 
     66 
     67 
    6268 
    6369    void LisaaPelaaja(Vector paikka, double leveys, double korkeus) 
    6470    { 
    6571        pelaaja1 = new PlatformCharacter(leveys, korkeus); 
    66         pelaaja1.Position = paikka; 
    6772        pelaaja1.Mass = 4.0; 
    6873        pelaaja1.Image = pelaajanKuva; 
    6974        AddCollisionHandler(pelaaja1, "tahti", TormaaTahteen); 
     75        pelaaja1. X = 0.0; 
     76        pelaaja1. Y = 100.0; 
    7077        Add(pelaaja1); 
    7178    } 
     
    9198    void Liikuta(PlatformCharacter hahmo, double nopeus) 
    9299    { 
    93         hahmo.Walk(nopeus); 
     100 
    94101    } 
    95102 
    96103    void Hyppaa(PlatformCharacter hahmo, double nopeus) 
    97104    { 
    98         hahmo.Jump(nopeus); 
     105 
    99106    } 
    100107 
     
    105112        tahti.Destroy(); 
    106113    } 
     114 
     115 
     116    void LisaaTaso(double x, double y) 
     117    { 
     118        PhysicsObject taso = PhysicsObject.CreateStaticObject(80.0, 20.0); 
     119        taso.Shape = Shape.Rectangle; 
     120        taso.X = x; 
     121        taso.Y = y; 
     122        taso.Color = Color.DarkForestGreen; 
     123        Add(taso); 
     124    } 
     125 
     126 
     127 
    107128} 
  • 2017/24/AaroM/TheLegendOfSpikey/TheLegendOfSpikey/TheLegendOfSpikey/obj/x86/Debug/ContentPipeline-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}.xml

    r8536 r8623  
    99      <Options>None</Options> 
    1010      <Output>C:\MyTemp\AaroM\TheLegendOfSpikey\TheLegendOfSpikey\TheLegendOfSpikey\bin\x86\Debug\Content\maali.xnb</Output> 
    11       <Time>2017-06-12T14:42:27.0329646+03:00</Time> 
     11      <Time>2017-06-13T10:27:53.0026763+03:00</Time> 
    1212    </Item> 
    1313    <Item> 
     
    1818      <Options>None</Options> 
    1919      <Output>C:\MyTemp\AaroM\TheLegendOfSpikey\TheLegendOfSpikey\TheLegendOfSpikey\bin\x86\Debug\Content\norsu.xnb</Output> 
    20       <Time>2017-06-12T14:54:22.5464556+03:00</Time> 
     20      <Time>2017-06-13T13:05:31.2193166+03:00</Time> 
    2121    </Item> 
    2222    <Item> 
     
    2727      <Options>None</Options> 
    2828      <Output>C:\MyTemp\AaroM\TheLegendOfSpikey\TheLegendOfSpikey\TheLegendOfSpikey\bin\x86\Debug\Content\tahti.xnb</Output> 
    29       <Time>2017-06-12T14:58:01.9789165+03:00</Time> 
     29      <Time>2017-06-13T13:05:31.2818252+03:00</Time> 
    3030    </Item> 
    3131    <Item> 
     
    3636      <Options>None</Options> 
    3737      <Output>C:\MyTemp\AaroM\TheLegendOfSpikey\TheLegendOfSpikey\TheLegendOfSpikey\bin\x86\Debug\Content\kentta1.xnb</Output> 
    38       <Time>2017-06-12T14:42:27.0329646+03:00</Time> 
     38      <Time>2017-06-13T10:27:53.0086092+03:00</Time> 
    3939    </Item> 
    4040    <BuildSuccessful>true</BuildSuccessful> 
     
    8585      <Assembly> 
    8686        <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> 
    87         <Value>2017-06-08T13:26:33.8923001+03:00</Value> 
     87        <Value>2017-06-08T18:20:14.6175359+03:00</Value> 
    8888      </Assembly> 
    8989    </Assemblies> 
Note: See TracChangeset for help on using the changeset viewer.