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 alone : PhysicsGame |
---|
10 | { |
---|
11 | public override void Begin() |
---|
12 | { |
---|
13 | PhysicsObject pallo = new PhysicsObject(40.0, 40.0); |
---|
14 | pallo.Shape = Shape.Circle ; |
---|
15 | pallo.X = -200.0; |
---|
16 | pallo.Y = 50.0; |
---|
17 | pallo.Restitution = 1.0; |
---|
18 | Add(pallo); |
---|
19 | Vector impulssi = new Vector(500.0, 40.0); |
---|
20 | pallo.Hit(impulssi); |
---|
21 | Level.CreateBorders(1.0, false); |
---|
22 | |
---|
23 | Level.BackgroundColor = Color.Red; |
---|
24 | Camera.ZoomToLevel(); |
---|
25 | |
---|
26 | Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); |
---|
27 | |
---|
28 | |
---|
29 | |
---|
Note: See
TracBrowser
for help on using the repository browser.