Changeset 9076


Ignore:
Timestamp:
2017-07-25 09:35:04 (2 years ago)
Author:
nupeohje
Message:

aliohjelma LuoPongmaila? tehty.

Location:
2017/30/JouniP/Syomispeli/Syomispeli/Syomispeli
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • 2017/30/JouniP/Syomispeli/Syomispeli/Syomispeli/Syomispeli.cs

    r9075 r9076  
    1818        LuoPallo(Color.Red, 50.0, 47.8); 
    1919 
     20        LuoPongmaila(200.0, 0.0); 
     21 
    2022        Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 
    2123    } 
    2224 
    23     void LuoOlio(Shape muoto, Color vari, double x, double y) 
     25     
     26 
     27    void LuoOlio(Shape muoto, Color vari, double x, double y, double leveys = 40.0, double korkeus = 40.0) 
    2428    { 
    25         PhysicsObject otus = new PhysicsObject(40.0, 40.0); 
     29        PhysicsObject otus = new PhysicsObject(leveys, korkeus); 
    2630        otus.Shape = muoto; 
    2731        otus.Color = vari; 
     
    3539        LuoOlio(Shape.Circle, vari, x, y); 
    3640    } 
     41 
     42    void LuoPongmaila(double x, double y) 
     43    { 
     44        //PhysicsObject maila = new PhysicsObject(20.0, 80.0); 
     45        //maila.X = x; 
     46        //maila.Y = y; 
     47        //Add(maila); 
     48 
     49        LuoOlio(Shape.Rectangle, Color.White, x, y, 20.0, 80.0); 
     50    } 
    3751} 
Note: See TracChangeset for help on using the changeset viewer.