Changeset 9622


Ignore:
Timestamp:
2018-06-06 14:56:21 (20 months ago)
Author:
veeranta
Message:
 
Location:
2018/23/VEETIR
Files:
12 added
18 edited

Legend:

Unmodified
Added
Removed
  • 2018/23/VEETIR/Pong/Pong/Pong.cs

    r9606 r9622  
    118118    void AsetaOhjaimet() 
    119119    { 
    120         Keyboard.Listen(Key.A, ButtonState.Down, AsetaNopeus, "Pelaaja 1: Liikutamailaa ylös", maila1, nopeusYlos); 
    121         Keyboard.Listen(Key.A, ButtonState.Released, AsetaNopeus, null, maila1, Vector.Zero); 
     120         
    122121        Keyboard.Listen(Key.Z, ButtonState.Down, AsetaNopeus, "Pelaaja 1: Liikuta mailaa alas", maila1, nopusAlas); 
    123122        Keyboard.Listen(Key.Z, ButtonState.Released, AsetaNopeus, null, maila1, Vector.Zero); 
  • 2018/23/VEETIR/Soccer/Soccer/Soccer/Content/Content.mgcb

    r9606 r9622  
    1515#---------------------------------- Content ---------------------------------# 
    1616 
     17#begin jalapallo.png 
     18/importer:TextureImporter 
     19/processor:TextureProcessor 
     20/processorParam:ColorKeyColor=255,0,255,255 
     21/processorParam:ColorKeyEnabled=True 
     22/processorParam:GenerateMipmaps=False 
     23/processorParam:PremultiplyAlpha=True 
     24/processorParam:ResizeToPowerOfTwo=False 
     25/processorParam:MakeSquare=False 
     26/processorParam:TextureFormat=Color 
     27/build:jalapallo.png 
     28 
  • 2018/23/VEETIR/Soccer/Soccer/Soccer/Ohjelma.cs

    r9606 r9622  
    1919        static void Main() 
    2020        { 
    21             using ( var game = new Soccer() ) 
     21            using (var game = new Soccer()) 
    2222                game.Run(); 
    2323        } 
     
    2525#endif 
    2626} 
     27 
     28 
     29 
     30 
     31 
     32 
     33 
  • 2018/23/VEETIR/Soccer/Soccer/Soccer/Soccer.cs

    r9606 r9622  
    66using Jypeli.Widgets; 
    77 
    8 public class Soccer : PhysicsGame 
     8   public class Soccer : PhysicsGame 
    99{ 
    10     //  PhysicsObject maalivahti; 
     10 
     11    Image tausta = LoadImage("jalapallo"); 
     12 
     13    PhysicsObject vasenReuna; 
     14    PhysicsObject oikeaReuna; 
     15 
     16      PhysicsObject vahti; 
    1117    PhysicsObject ball; 
    1218    public override void Begin() 
     
    1925 
    2026 
    21          
     27        
    2228        PalloLiikkuu(); 
    2329        LuoKentta(); 
    24  
     30        AsetaOhjaimet(); 
    2531 
    2632        void LuoKentta() 
     
    2935            ball.Shape = Shape.Circle; 
    3036            Add(ball); 
     37 
     38            vasenReuna = Level.CreateLeftBorder(); 
     39            vasenReuna.Restitution = 1.0; 
     40            vasenReuna.IsVisible = false; 
     41            vasenReuna.KineticFriction = 0.0; 
     42 
     43            Level.Background.Image = tausta; 
     44 
     45 
     46            oikeaReuna = Level.CreateRightBorder(); 
     47            oikeaReuna.Restitution = 1.0; 
     48            oikeaReuna.IsVisible = false; 
     49            oikeaReuna.KineticFriction = 0.0; 
     50 
     51            PhysicsObject alaReuna = Level.CreateBottomBorder(); 
     52            alaReuna.Restitution = 1.0; 
     53            alaReuna.IsVisible = false; 
     54            alaReuna.KineticFriction = 0.0; 
     55 
     56            PhysicsObject yläReuna = Level.CreateTopBorder(); 
     57            yläReuna.Restitution = 1.0; 
     58            yläReuna.IsVisible = false; 
     59            yläReuna.KineticFriction = 0.0; 
     60             
     61 
     62 
     63 
     64            vahti = LuoVahti(x: Level.Left + 20.0, y: 0.0); 
    3165        } 
    3266 
     
    4579 
    4680    { 
    47         PhysicsObject vahti = PhysicsObject.CreateStaticObject(20.0, 100.0); 
     81        PhysicsObject vahti = PhysicsObject.CreateStaticObject(20.0, 140.0); 
    4882        vahti.Shape = Shape.Rectangle; 
    4983        Add(vahti); 
     84        vahti.X = x; 
     85        vahti.Y = y; 
    5086        return vahti; 
    5187    } 
     
    5793        ball.Push(nopeus); 
    5894    } 
    59  
    60   
     95    void AsetaOhjaimet() 
     96    { 
     97        Keyboard.Listen(Key.A, ButtonState.Down, Liikuttaa, "Pelaaja 1: Liikutavahtia ylös", new Vector (40.0, 0.0)); 
     98        Keyboard.Listen(Key.A, ButtonState.Released, Liikuttaa, null, Vector.Zero); 
     99    } 
    61100} 
  • 2018/23/VEETIR/Soccer/Soccer/Soccer/obj/x86/Debug/Soccer.csproj.FileListAbsolute.txt

    r9606 r9622  
    2323C:\MyTemp\Veeti Ranta\RL\Soccer\Soccer\Soccer\bin\Windows\Debug\SharpDX.XInput.xml 
    2424C:\MyTemp\Veeti Ranta\RL\Soccer\Soccer\Soccer\bin\Windows\Debug\SharpDX.Direct3D9.xml 
    25 C:\MyTemp\Veeti Ranta\RL\Soccer\Soccer\Soccer\obj\x86\Debug\Soccer.csprojResolveAssemblyReference.cache 
    2625C:\MyTemp\Veeti Ranta\RL\Soccer\Soccer\Soccer\obj\x86\Debug\Soccer.csproj.CoreCompileInputs.cache 
    2726C:\MyTemp\Veeti Ranta\RL\Soccer\Soccer\Soccer\obj\x86\Debug\Soccer.exe 
    2827C:\MyTemp\Veeti Ranta\RL\Soccer\Soccer\Soccer\obj\x86\Debug\Soccer.pdb 
     28C:\MyTemp\Veeti Ranta\RL\Soccer\Soccer\Soccer\bin\Windows\Debug\Content\jalapallo.xnb 
     29C:\MyTemp\Veeti Ranta\RL\Soccer\Soccer\Soccer\obj\x86\Debug\Soccer.csprojResolveAssemblyReference.cache 
Note: See TracChangeset for help on using the changeset viewer.