Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD

flame scrolling sprite

flame scrolling sprite is a flame package to make it easy to render sprites that scrolls and repeat itself forever given a velocity.

this can be used to create things like an scrolling background, or even create scenes, bellow you can see one example of this:

train

this package can be used by using the plain class scrollingsprite or the scrollingspritecomponent, they do example the same thing, but the later can be used together with flame component system.

bellow you can find all the parameters that the classes receives

    //// resource path of the sprite
    @required string spritepath,

    //// x and y coordinate do be used to map the sprite
    double spritex = 0.0,
    double spritey = 0.0,

    //// width and height of the mapped sprite
    double spritewidth,
    double spriteheight,

    //// destination width and height of the sprite, in case you want to scale its original size
    double spritedestwidth,
    double spritedestheight,

    //// width and height of the total area where the sprites will scroll
    double width,
    double height,

    //// vertical and horizontal speed of the scrolling speed in pixels per second
    this.verticalspeed = 0.0,
    this.horizontalspeed = 0.0,

    //// since the sprites are scrolling on an endless manner, the sprite can be draw outside of its
    //// area, by default, the package already clips the area to prevent it from showing, use this flag to change
    //// this behaviour
    this.cliptodimensions = true,

when using the scrollingspritecomponent the same paramenters above apply to it, and additionally, you can inform the x and y where the area will place placed.

for a live example of this running, please refer to the example folder.


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD

Comments are closed.