Stack With Friends Demo
import QtQuick 2.0
import Felgo 3.0
EntityBaseDraggable {
id: obstacle
entityType: "obstacleTriangle"
width: 32
height: 32
levelWidth: gameScene.width
colliderComponent: collider
selectionMouseArea.anchors.fill: sprite
inLevelEditingMode: gameScene.state === "levelEditing"
dragOffset: Qt.point(0,0)
gridSize: 16
colliderSize: width
opacityChangeItemWhileSelected: sprite
onEntityClicked: gameScene.entitySelected(obstacle)
onEntityPressAndHold: removeEntity()
delayDragOffset: true
Image {
id: sprite
x: -width/2
y: -height/2
width: parent.width
height: parent.height
source: "../../assets/img/block2.png"
}
PolygonCollider {
id: collider
bodyType: Body.Static
vertices: [
Qt.point(-15, -15),
Qt.point(-15, 15),
Qt.point(15, 15)