示例#1
0
        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;
        }
示例#2
0
        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;
        }