Changeset 8587 for 2017/24


Ignore:
Timestamp:
2017-06-13 13:28:21 (6 years ago)
Author:
jotapoti
Message:

Lisätty hahmolle kuva. Hahmo muutettu PlatformCharacteriksi?. Hahmo voi hyppiä ja liikkua vasemmalle ja oikealle.

Location:
2017/24/JouniP
Files:
5 added
8 edited

Legend:

Unmodified
Added
Removed
  • 2017/24/JouniP/Maryo/Maryo/Maryo/Maryo.cs

    r8548 r8587  
    99public class Maryo : PhysicsGame 
    1010{ 
    11     PhysicsObject pelaaja; 
     11    PlatformCharacter pelaaja; 
     12    Image pelaajaKatsooOikealle = LoadImage("Melissa_R"); 
    1213 
    1314    public override void Begin() 
    1415    { 
     16        SmoothTextures = false; 
     17 
    1518        KeskitaIkkuna(); 
    1619         
     
    2023        LuoKentta(); 
    2124 
    22         //Gravity = new Vector(0.0, -100.0); 
    23  
     25        Gravity = new Vector(0.0, -1000.0); 
     26        Camera.Zoom(2.0); 
     27        Camera.Follow(pelaaja); 
    2428         
    2529    } 
     
    4549    void LuoPelaaja() 
    4650    { 
    47         pelaaja = new PhysicsObject(100.0, 100.0); 
     51        pelaaja = new PlatformCharacter(100.0, 100.0); 
    4852        pelaaja.CanRotate = false; 
     53        pelaaja.Image = pelaajaKatsooOikealle; 
    4954        Add(pelaaja); 
    5055    } 
     
    5863    void LisaaNappainkuuntelijat() 
    5964    { 
    60         Keyboard.Listen(Key.Left, ButtonState.Down, LiikutaPelaajaa, null, new Vector(-100, 0)); 
    61         Keyboard.Listen(Key.Right, ButtonState.Down, LiikutaPelaajaa, null, new Vector(100, 0)); 
    62         Keyboard.Listen(Key.Up, ButtonState.Down, LiikutaPelaajaa, null, new Vector(0, 100)); 
    63         Keyboard.Listen(Key.Down, ButtonState.Down, LiikutaPelaajaa, null, new Vector(0, -100)); 
     65        Keyboard.Listen(Key.Left, ButtonState.Down, KavelytaPelaajaa, null, -300.0); 
     66        Keyboard.Listen(Key.Right, ButtonState.Down, KavelytaPelaajaa, null, 300.0); 
     67        Keyboard.Listen(Key.Up, ButtonState.Down, HypaytaPelaajaa, null); 
     68        //Keyboard.Listen(Key.Down, ButtonState.Down, LiikutaPelaajaa, null, new Vector(0, -100)); 
    6469 
    6570        //PhoneBackButton.Listen(ConfirmExit, "Lopeta peli"); 
    6671        Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 
     72    } 
     73 
     74    void KavelytaPelaajaa(double nopeusVaakasuunnassa) 
     75    { 
     76        pelaaja.Walk(nopeusVaakasuunnassa); 
     77    } 
     78 
     79    void HypaytaPelaajaa() 
     80    { 
     81        pelaaja.Jump(500.0); 
    6782    } 
    6883 
  • 2017/24/JouniP/Maryo/Maryo/Maryo/obj/x86/Debug/ContentPipeline-{5C191065-01B3-4B75-A129-AF58D1488B13}.xml

    r8545 r8587  
    22<XnaContent xmlns:Pipeline="Microsoft.Xna.Framework.Content.Pipeline"> 
    33  <Asset Type="Pipeline:BuildItemCollection"> 
     4    <Item> 
     5      <Source>Melissa_R.png</Source> 
     6      <Name>Melissa_R</Name> 
     7      <Importer>TextureImporter</Importer> 
     8      <Processor>TextureProcessor</Processor> 
     9      <Options>None</Options> 
     10      <Output>C:\MyTemp\JouniP\Maryo\Maryo\Maryo\bin\x86\Debug\Content\Melissa_R.xnb</Output> 
     11      <Time>2017-06-13T13:18:28.7858361+03:00</Time> 
     12    </Item> 
    413    <BuildSuccessful>true</BuildSuccessful> 
    514    <Settings> 
     
    1625    <Assemblies> 
    1726      <Assembly> 
     27        <Key>C:\Program Files (x86)\Jypeli\lib\ContentExtensions\TextFileContentExtension.dll</Key> 
     28        <Value>2016-03-29T10:06:40+03:00</Value> 
     29      </Assembly> 
     30      <Assembly> 
     31        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.XImporter.dll</Key> 
     32        <Value>2011-09-01T17:22:30+03:00</Value> 
     33      </Assembly> 
     34      <Assembly> 
     35        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.VideoImporters.dll</Key> 
     36        <Value>2011-09-01T17:22:30+03:00</Value> 
     37      </Assembly> 
     38      <Assembly> 
     39        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.TextureImporter.dll</Key> 
     40        <Value>2011-09-01T17:22:30+03:00</Value> 
     41      </Assembly> 
     42      <Assembly> 
     43        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.FBXImporter.dll</Key> 
     44        <Value>2011-09-01T17:22:30+03:00</Value> 
     45      </Assembly> 
     46      <Assembly> 
     47        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.EffectImporter.dll</Key> 
     48        <Value>2011-09-01T17:22:30+03:00</Value> 
     49      </Assembly> 
     50      <Assembly> 
     51        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.AudioImporters.dll</Key> 
     52        <Value>2011-09-01T17:22:30+03:00</Value> 
     53      </Assembly> 
     54      <Assembly> 
     55        <Key>C:\Program Files (x86)\Jypeli\lib\ContentExtensions\AnimationExtension.dll</Key> 
     56        <Value>2016-03-29T10:06:38+03:00</Value> 
     57      </Assembly> 
     58      <Assembly> 
    1859        <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> 
    1960        <Value>2017-01-23T21:13:21.3033127+02:00</Value> 
  • 2017/24/JouniP/Maryo/Maryo/Maryo/obj/x86/Debug/Maryo.csproj.FileListAbsolute.txt

    r8545 r8587  
    77C:\MyTemp\JouniP\Maryo\Maryo\Maryo\obj\x86\Debug\Maryo.exe 
    88C:\MyTemp\JouniP\Maryo\Maryo\Maryo\obj\x86\Debug\Maryo.pdb 
     9C:\MyTemp\JouniP\Maryo\Maryo\Maryo\bin\x86\Debug\Content\Melissa_R.xnb 
  • 2017/24/JouniP/Maryo/Maryo/MaryoContent/MaryoContent.contentproj

    r8545 r8587  
    4545    <Reference Include="AnimationExtension" /> 
    4646  </ItemGroup> 
     47  <ItemGroup> 
     48    <Compile Include="Melissa_R.png"> 
     49      <Name>Melissa_R</Name> 
     50      <Importer>TextureImporter</Importer> 
     51      <Processor>TextureProcessor</Processor> 
     52    </Compile> 
     53  </ItemGroup> 
    4754  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    4855  <!--  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.