Ejemplo n.º 1
0
 public override void load(AxiosGameScreen gameScreen, ref Dictionary<string, Texture2D> cache, Layer layer)
 {
     base.load(gameScreen, ref cache, layer);
     if (gameScreen.LoadRectangleItem(this))
     {
         _body = BodyFactory.CreateRectangle(gameScreen.World, ConvertUnits.ToSimUnits(Width), ConvertUnits.ToSimUnits(Height), 1f);
         _body.Position = ConvertUnits.ToSimUnits(Position) + new Vector2(ConvertUnits.ToSimUnits(Width) / 2, ConvertUnits.ToSimUnits(Height) / 2);
         _body.UserData = this;
     }
 }
Ejemplo n.º 2
0
 public override void load(AxiosGameScreen gameScreen, ref Dictionary<string, Texture2D> cache, Layer layer)
 {
     base.load(gameScreen, ref cache, layer);
     if (gameScreen.LoadCircleItem(this))
     {
         _body = BodyFactory.CreateCircle(gameScreen.World, Radius, 1f);
         _body.Position = ConvertUnits.ToSimUnits(Position);
         _body.UserData = this;
     }
 }