コード例 #1
0
 private void cmdSetParBkg_Click(object sender, RoutedEventArgs e)
 {
     //MainGFX.Height = 50;
     //GameWrapper.Width = 50;
     MainGFX.RemoveObject(ThisLevel.Background);
     ThisLevel.Background              = new SpriteObject();
     ThisLevel.Background.Name         = "Background";
     ThisLevel.Background.CenterOfMass = new Vector(0, 0);
     ThisLevel.Background.IsMovable    = false;
     ThisLevel.Background.IsObstacle   = false;
     ThisLevel.selectImage(ThisLevel.Background);
     (ThisLevel.Background as SpriteObject).ZoomPreserveAspectRatio(height: GameWrapper.Height);
     MainGFX.AddObject(ThisLevel.Background);
     MainGFX.Width = ThisLevel.Background.SizeV.X;
     // todo: eigentlich in setlvlbackg
     //MainGFX.Width = thisLevel.Background.SizeV.X;
     // MainGFX.Height = 500;
 }