Beispiel #1
0
 private void Initialize(double width, double height, Shape shape)
 {
     Body           = PhysicsGameBase.Instance.Engine.CreateBody(this, width, height, shape);
     Body.Collided += this.OnCollided;
 }
Beispiel #2
0
 /// <summary>
 /// Alustaa fysiikkaolion käyttöön.
 /// </summary>
 /// <param name="width">Leveys.</param>
 /// <param name="height">Korkeus.</param>
 /// <param name="shape">Muoto (esim. Shape.Circle).</param>
 /// <param name="x">Olion sijainnin X-koordinaatti.</param>
 /// <param name="y">Olion sijainnin Y-koordinaatti.</param>
 public PhysicsObject(double width, double height, Shape shape, double x = 0.0, double y = 0.0)
     : base(width, height, shape)
 {
     Initialize(width, height, shape);
     Position = new Vector(x, y);
 }