Revision 13,
1.1 KB
checked in by anlakane, 13 years ago
(diff) |
Pong...
|
Line | |
---|
1 | #region Usings |
---|
2 | using System; |
---|
3 | using System.Collections.Generic; |
---|
4 | using System.Linq; |
---|
5 | using Microsoft.Xna.Framework; |
---|
6 | using Microsoft.Xna.Framework.Audio; |
---|
7 | using Microsoft.Xna.Framework.Content; |
---|
8 | using Microsoft.Xna.Framework.Graphics; |
---|
9 | using Microsoft.Xna.Framework.Input; |
---|
10 | using Microsoft.Xna.Framework.Media; |
---|
11 | using Jypeli; |
---|
12 | using Jypeli.ScreenObjects; |
---|
13 | using Jypeli.Assets; |
---|
14 | using AdvanceMath; |
---|
15 | using Physics2DDotNet; |
---|
16 | using Physics2DDotNet.Shapes; |
---|
17 | #endregion |
---|
18 | |
---|
19 | namespace FysiikkaPeli1 |
---|
20 | { |
---|
21 | public class Peli : PhysicsGame |
---|
22 | { |
---|
23 | protected override void LoadContent() |
---|
24 | { |
---|
25 | IShape ympyra = Shapes.CreateCircle( 20.0 ); |
---|
26 | PhysicsObject pallo = new PhysicsObject(10.0, ympyra); |
---|
27 | Level.Objects.Add(pallo); |
---|
28 | pallo.X = -150.0; |
---|
29 | pallo.Y = 34.0; |
---|
30 | Vector2D impulssi = new Vector2D(4000.5, 0.0); |
---|
31 | pallo.Hit(impulssi); |
---|
32 | |
---|
33 | pallo.Restitution = 1.0; |
---|
34 | Level.CreateBorder(1.0, false); |
---|
35 | Level.BackgroundColor = Color.Black; |
---|
36 | Level kentta = new Level(this); |
---|
37 | |
---|
38 | |
---|
39 | |
---|
40 | } |
---|
41 | } |
---|
42 | } |
---|
43 | |
---|
Note: See
TracBrowser
for help on using the repository browser.