Squaby Demo
import QtQuick 2.0
import Felgo 4.0
TowerBaseSprite {
id: nailgunSprite
spriteSheetSource: Qt.resolvedUrl("../../assets/img/spritesheets/nailgun/1-base.png")
property alias running: spriteSequence.running
scale: 0.875
Item {
GameSpriteSequence {
id: spriteSequence
rotation: nailgunSprite.parent.rotation
anchors.centerIn: parent
defaultSource: Qt.resolvedUrl("../../assets/img/spritesheets/nailgun/nailgun.png")
GameSprite {
name: "idle"
startFrameColumn: 1
startFrameRow: frameElement
frameWidth: 32
frameHeight: 64
frameDuration: 100000
}
GameSprite {
id: shootAnimation
name: "shoot"
frameWidth: 32
frameHeight: 64
frameCount: 10
startFrameColumn: 1
startFrameRow: frameElement
frameRate: 60
to: {"idle": 1}
}
}
}
function playShootAnimation() {