Line | |
---|
1 | using System; |
---|
2 | using System.Collections.Generic; |
---|
3 | using Jypeli; |
---|
4 | using Jypeli.Assets; |
---|
5 | using Jypeli.Controls; |
---|
6 | using Jypeli.Effects; |
---|
7 | using Jypeli.Widgets; |
---|
8 | |
---|
9 | public class Peli : PhysicsGame |
---|
10 | { |
---|
11 | public override void Begin() |
---|
12 | { |
---|
13 | Gravity = new Vector(0, -1000); |
---|
14 | |
---|
15 | for (int i = 0; i < 25; i++) |
---|
16 | { |
---|
17 | PhysicsObject norsupallo = new PhysicsObject(50, 50, Shape.Circle); |
---|
18 | norsupallo.Image = LoadImage("norsu"); |
---|
19 | norsupallo.X = RandomGen.NextDouble(Level.Left + 25, Level.Right - 25); |
---|
20 | norsupallo.Y = Level.Top - 25; |
---|
21 | Add(norsupallo); |
---|
22 | } |
---|
23 | |
---|
24 | Level.BackgroundColor = Color.DarkViolet; |
---|
25 | Level.CreateBorders(); |
---|
26 | } |
---|
27 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.