Changeset 6021 for 2015/24


Ignore:
Timestamp:
2015-06-11 13:32:37 (4 years ago)
Author:
jotapoti
Message:

Esimerkkiohjelmat lisätty

Location:
2015/24/JouniP
Files:
56 added
6 edited

Legend:

Unmodified
Added
Removed
  • 2015/24/JouniP/JouninHienoFysiikkapeli/JouninHienoFysiikkapeli/JouninHienoFysiikkapeli/JouninHienoFysiikkapeli.cs

    r5975 r6021  
    1111    public override void Begin() 
    1212    { 
    13         IsFullScreen = false; 
    14         SetWindowSize(800, 600); 
     13        IsFullScreen = true; 
     14        //SetWindowSize(800, 600); 
    1515 
    1616        Level.CreateBorders(); 
    1717        PhysicsObject ympyra = LuoOlio(140.0, 76.0, Color.Red, Shape.Circle); 
    1818        ympyra.Tag = "hyvis"; 
    19  
     19         
    2020        Vector impulssi = new Vector(100, 0); 
    2121        ympyra.Hit(impulssi); 
     
    2424 
    2525        LuoOlio(0.0, 0.0, Color.Black, Shape.Diamond); 
     26 
     27        for (int i = 0; i < 100; i++) 
     28        { 
     29            LuoOlio(RandomGen.NextDouble(Level.Left, Level.Right), RandomGen.NextDouble(Level.Bottom, Level.Top), RandomGen.NextColor(), Shape.Circle); 
     30        } 
     31 
     32        for (int i = 0; i < 10; i++) 
     33        { 
     34            PhysicsObject luotuPallo = LuoOlio(RandomGen.NextDouble(Level.Left, Level.Right), RandomGen.NextDouble(Level.Bottom, Level.Top), RandomGen.NextColor(), Shape.Circle); 
     35            luotuPallo.Tag = "hyvis"; 
     36            AddCollisionHandler(luotuPallo, "pahis", TeeRajahdys); 
     37        } 
    2638        // luodaan pallo: 
    2739        //PhysicsObject pallo2 = new PhysicsObject(50, 50); 
Note: See TracChangeset for help on using the changeset viewer.