source: 2010/23/elalylon/PerusPeli1/Peli.cs @ 540

Revision 540, 872 bytes checked in by paaaanro, 13 years ago (diff)

Tein Tiistain tehtävät 1-4, tehtävä viiden keskeneräinen versio on tässä.

Line 
1using System;
2using Jypeli;
3using Jypeli.ScreenObjects;
4using Jypeli.Assets;
5
6namespace PerusPeli1
7{
8    public class Peli : Game
9    {
10        protected override void Begin()
11        {
12for (int i = 0; i < 20; i++)
13                {
14                    PiiraYmpyra();
15                }
16        }
17        void PiiraYmpyra()
18            {
19                int x = RandomGen.NextInt(-640, 640);
20                int y = RandomGen.NextInt(-512, 512);
21                PhysicsObject ympyra = new PhysicsObject(10, 10, Shapes.Circle);
22                ympyra.X = x;
23                ympyra.Y = y;
24                if (x > 0)
25                {
26                    if (y > 0)
27                    {
28                       
29                    }
30                    Add(ympyra);
31                }
32                Add(ympyra); 
33            }
34    }
35}
Note: See TracBrowser for help on using the repository browser.