Beispiel #1
0
        internal static void RunGame()
        {
            game = new GamePong();
            game.Run();
#if !__IOS__ && !__TVOS__
            game.Dispose();
#endif
        }
Beispiel #2
0
 // Constructor
 public Paddle(
     GamePong pong,
     String path  = null,
     float x      = 0f,
     float y      = 0f,
     float width  = 10f,
     float height = 10f) : base(pong, path, x, y, width, height)
 {
     color = Color.Black;
 }
Beispiel #3
0
 // Constructor
 public Sprite(
     GamePong pong,
     String path  = null,
     float x      = 0f,
     float y      = 0f,
     float width  = 0f,
     float height = 0f) : base(pong, x, y, width, height)
 {
     texturePath = path;
 }
Beispiel #4
0
 // Constructor
 public Ball(
     GamePong pong,
     String path,
     float x      = 0f,
     float y      = 0f,
     float width  = 10f,
     float height = 10f) : base(pong, path, x, y, width, height)
 {
     transform.direction = new Vector2((float)r.NextDouble() * 2 - 1, (float)r.NextDouble() * 2 - 1);
     transform.direction.Normalize();
 }
Beispiel #5
0
 // Constructor
 public GameObject(
     GamePong pong,
     float x      = 0f,
     float y      = 0f,
     float width  = 0f,
     float height = 0f)
 {
     game = pong;
     transform.position = new Vector2(x, y);
     transform.Width    = width;
     transform.Height   = height;
 }
Beispiel #6
0
 // Constructor
 public EventHandler(GamePong pong) : base(pong)
 {
     InitialWindowPosition = game.Window.Position;
 }
Beispiel #7
0
 // Constructor
 public GUI(GamePong pong, String path) : base(pong, path)
 {
 }
Beispiel #8
0
 public Scene(GamePong pong)
 {
     game     = pong;
     rootNode = new GameObject(game);
 }
Beispiel #9
0
 static void Main()
 {
     using (var game = new GamePong())
         game.Run();
 }