private void createBackground(ref SpriteObjects.Sprite back, float scaleX, float scaleY) { Vector2 backPos = new Vector2( 0, 0); float backScaleX = scaleX; float backScaleY = scaleY; float spriteRotation = 0f; back = new SpriteObjects.Sprite(backPos, spriteRotation); back.WidthScale = backScaleX; back.HeightScale = backScaleY; }
private void createBackground(ref SpriteObjects.Sprite back, MapSurfacesBackgoundPicture backSpec) { Vector2 backPos = new Vector2( Convert.ToInt32(backSpec.Asset.Position.X), Convert.ToInt32(backSpec.Asset.Position.Y) ); float backScaleX = (float)Convert.ToDecimal(backSpec.Asset.Scale.X); float backScaleY = (float)Convert.ToDecimal(backSpec.Asset.Scale.Y); float spriteRotation = (float)Convert.ToDecimal(backSpec.Asset.Rotation); back = new SpriteObjects.Sprite(backPos, spriteRotation); back.WidthScale = backScaleX; back.HeightScale = backScaleY; }