Changeset 8863 for 2017


Ignore:
Timestamp:
2017-07-04 11:54:53 (2 years ago)
Author:
npo17_42
Message:

tekeminen jatkuu.

Location:
2017/27/OskariK
Files:
8 added
15 edited

Legend:

Unmodified
Added
Removed
  • 2017/27/OskariK/OK/OK/OK/OK.cs

    r8840 r8863  
    77using Jypeli.Widgets; 
    88 
    9 public class OK : Game 
     9public class OK : PhysicsGame 
    1010{ 
    11     PhysicsObject command; 
    12     PhysicsObject feed; 
     11    GameObject command; 
     12    GameObject feed; 
     13    GameObject portrait; 
     14    GameObject foe; 
     15 
     16    PhysicsObject Pointer; 
     17 
     18    Vector nopeusYlos = new Vector(0, 100); 
     19    Vector nopeusAlas = new Vector(0, -100); 
     20    Vector nopeusVasen = new Vector(-200, 0); 
     21    Vector nopeusOikea = new Vector(200, 0); 
     22 
    1323    public override void Begin() 
    1424    { 
    1525        LuoAlue(); 
     26        luopelaaja(); 
    1627        Kontrollit(); 
    1728 
     
    2334        Level.Background.Color = Color.White; 
    2435 
    25         command = new PhysicsObject(400.0, 300.0); 
     36        command = new GameObject(450.0, 300.0); 
    2637        command.Shape = Shape.Rectangle; 
    2738        command.Color = Color.Black; 
    28         command.X = 100.00; 
    29         command.Y = -250.00; 
     39        command.X = 370.00; 
     40        command.Y = -330.00; 
     41        command.Image = LoadImage("Kökkö"); 
    3042        Add(command); 
    3143 
    32         feed = new PhysicsObject(700.00, 300.00); 
     44        feed = new GameObject(1000.00, 300.00); 
    3345        feed.Shape = Shape.Rectangle; 
    3446        feed.Color = Color.Black; 
    35         feed.X = -500.00; 
    36         feed.Y = -250.00; 
     47        feed.X = -400.00; 
     48        feed.Y = -330.00; 
    3749        Add(feed); 
    3850 
    39         portrait = new PhysicsObject(100.00, 300.00); 
     51        portrait = new GameObject(250.00, 300.00); 
     52        portrait.Shape = Shape.Rectangle; 
     53        portrait.Color = Color.Black; 
     54        portrait.X = 750.00; 
     55        portrait.Y = -330.00; 
     56        Add(portrait); 
     57 
     58        foe = new GameObject(1800.00, 700.00); 
     59        foe.Shape = Shape.Rectangle; 
     60        foe.Color = Color.Blue; 
     61        foe.X = -10.00; 
     62        foe.Y = 200.00; 
     63        Add(foe); 
    4064    } 
    4165 
     66    PhysicsObject luopelaaja() 
     67    { 
     68        Pointer = new PhysicsObject (10.0, 10.0); 
     69        Pointer.Color = Color.White; 
     70        Pointer.X = 190.00; 
     71        Pointer.Y = -220.00; 
     72        Add(Pointer,3); 
     73        return Pointer; 
     74  } 
     75 
     76    void AsetaNopeus(PhysicsObject Pointer, Vector nopeus) 
     77    { 
     78        Vector sijainti = Pointer.Position + nopeus; 
     79        if (sijainti.Y > command.Top) return; 
     80        else if (sijainti.Y < command.Bottom) return; 
     81 
     82        Pointer.MoveTo(Pointer.Position + nopeus, 1000.00); 
     83         
     84    } 
    4285    void Kontrollit () 
    43     { Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); } 
     86    { 
     87        Keyboard.Listen(Key.Down, ButtonState.Pressed, AsetaNopeus, "liikkuu", Pointer, nopeusAlas); 
     88        //Keyboard.Listen(Key.Down, ButtonState.Released, AsetaNopeus, null, Pointer, Vector.Zero); 
     89 
     90        Keyboard.Listen(Key.Up, ButtonState.Pressed, AsetaNopeus, "liikkuu", Pointer, nopeusYlos); 
     91        //Keyboard.Listen(Key.Up, ButtonState.Released, AsetaNopeus, null, Pointer, Vector.Zero); 
     92 
     93        //Keyboard.Listen(Key.Left, ButtonState.Pressed, AsetaNopeus, "liikkuu", Pointer, nopeusVasen); 
     94        ///Keyboard.Listen(Key.Left, ButtonState.Released, AsetaNopeus, null, Pointer, Vector.Zero); 
     95 
     96        //Keyboard.Listen(Key.Right, ButtonState.Pressed, AsetaNopeus, "liikkuu", Pointer, nopeusOikea); 
     97        //Keyboard.Listen(Key.Right, ButtonState.Released, AsetaNopeus, null, Pointer, Vector.Zero); 
     98 
     99        Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); } 
    44100} 
  • 2017/27/OskariK/OK/OK/OK/obj/x86/Debug/ContentPipeline-{FF5F8A32-FAE3-40A4-9505-35D2B1C5DB01}.xml

    r8840 r8863  
    22<XnaContent xmlns:Pipeline="Microsoft.Xna.Framework.Content.Pipeline"> 
    33  <Asset Type="Pipeline:BuildItemCollection"> 
     4    <Item> 
     5      <Source>kikki.png</Source> 
     6      <Name>kikki</Name> 
     7      <Importer>TextureImporter</Importer> 
     8      <Processor>TextureProcessor</Processor> 
     9      <Options>None</Options> 
     10      <Output>C:\MyTemp\OskariK\OK\OK\OK\bin\x86\Debug\Content\kikki.xnb</Output> 
     11      <Time>2017-07-04T11:30:13.5834865+03:00</Time> 
     12    </Item> 
     13    <Item> 
     14      <Source>kökkö.png</Source> 
     15      <Name>kökkö</Name> 
     16      <Importer>TextureImporter</Importer> 
     17      <Processor>TextureProcessor</Processor> 
     18      <Options>None</Options> 
     19      <Output>C:\MyTemp\OskariK\OK\OK\OK\bin\x86\Debug\Content\kökkö.xnb</Output> 
     20      <Time>2017-07-04T11:40:52.0044288+03:00</Time> 
     21    </Item> 
    422    <BuildSuccessful>true</BuildSuccessful> 
    523    <Settings> 
     
    1634    <Assemblies> 
    1735      <Assembly> 
     36        <Key>C:\Program Files (x86)\Jypeli\lib\ContentExtensions\TextFileContentExtension.dll</Key> 
     37        <Value>2015-02-09T20:18:44+02:00</Value> 
     38      </Assembly> 
     39      <Assembly> 
     40        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.XImporter.dll</Key> 
     41        <Value>2011-09-01T16:22:30+03:00</Value> 
     42      </Assembly> 
     43      <Assembly> 
     44        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.VideoImporters.dll</Key> 
     45        <Value>2011-09-01T16:22:30+03:00</Value> 
     46      </Assembly> 
     47      <Assembly> 
     48        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.TextureImporter.dll</Key> 
     49        <Value>2011-09-01T16:22:30+03:00</Value> 
     50      </Assembly> 
     51      <Assembly> 
     52        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.FBXImporter.dll</Key> 
     53        <Value>2011-09-01T16:22:30+03:00</Value> 
     54      </Assembly> 
     55      <Assembly> 
     56        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.EffectImporter.dll</Key> 
     57        <Value>2011-09-01T16:22:30+03:00</Value> 
     58      </Assembly> 
     59      <Assembly> 
     60        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.AudioImporters.dll</Key> 
     61        <Value>2011-09-01T16:22:30+03:00</Value> 
     62      </Assembly> 
     63      <Assembly> 
     64        <Key>C:\Program Files (x86)\Jypeli\lib\ContentExtensions\AnimationExtension.dll</Key> 
     65        <Value>2015-02-17T22:27:18+02:00</Value> 
     66      </Assembly> 
     67      <Assembly> 
    1868        <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> 
    1969        <Value>2017-06-07T15:46:40.1506283+03:00</Value> 
  • 2017/27/OskariK/OK/OK/OK/obj/x86/Debug/OK.csproj.FileListAbsolute.txt

    r8840 r8863  
    77C:\MyTemp\OskariK\OK\OK\OK\obj\x86\Debug\OK.exe 
    88C:\MyTemp\OskariK\OK\OK\OK\obj\x86\Debug\OK.pdb 
     9C:\MyTemp\OskariK\OK\OK\OK\bin\x86\Debug\Content\kikki.xnb 
     10C:\MyTemp\OskariK\OK\OK\OK\bin\x86\Debug\Content\kökkö.xnb 
  • 2017/27/OskariK/OK/OK/OKContent/OKContent.contentproj

    r8840 r8863  
    4545    <Reference Include="AnimationExtension" /> 
    4646  </ItemGroup> 
     47  <ItemGroup> 
     48    <Compile Include="kikki.png"> 
     49      <Name>kikki</Name> 
     50      <Importer>TextureImporter</Importer> 
     51      <Processor>TextureProcessor</Processor> 
     52    </Compile> 
     53  </ItemGroup> 
     54  <ItemGroup> 
     55    <Compile Include="kökkö.png"> 
     56      <Name>kökkö</Name> 
     57      <Importer>TextureImporter</Importer> 
     58      <Processor>TextureProcessor</Processor> 
     59    </Compile> 
     60  </ItemGroup> 
    4761  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    4862  <!--  To modify your build process, add your task inside one of the targets below and uncomment it.  
  • 2017/27/OskariK/Pong/Pong/Pong/Pong.cs

    r8832 r8863  
    7474    void Aloitapeli() 
    7575    { 
    76         Vector impulssi = new Vector(1000.0, 0.0); 
     76        Vector impulssi = new Vector(2000.0, 0.0); 
    7777        pallo.Hit(impulssi); 
    7878    } 
Note: See TracChangeset for help on using the changeset viewer.