Forums

OverviewV-Play 1 SupportBinding loop detected for property … › Reply To: Binding loop detected for property …

OverviewV-Play 1 SupportBinding loop detected for property … › Reply To: Binding loop detected for property …
#6644

PanflamCutie

I forgot to add the Wall.qml

<code class="language-qml">import QtQuick 1.1
import VPlay 1.0
import Box2D 1.0 // for accessing the Body.Static type


EntityBaseDraggable {
    id: wall1
    entityType: "wall"
    property real gridSize: gameScene.fieldsize
    width: gridSize
    height: gridSize
    x: column * gridSize
    y: row * gridSize
    z: 0

    property int column
    property int row
    signal findImages

    // the default not allowed to build rectangle has its position at x:-width/2 and y:-height/2
    notAllowedRectangle.x: 0
    notAllowedRectangle.y: 0
    // this is used internally (it was initially added for our squaby demo game) so the towers cannot be built at the edges of the level, however that is just what you want, so set this internal value to 0
    __towerSizeInGridsHalf: 0
    selectionMouseArea.anchors.fill: wall1
    selectionMouseArea.onPressAndHold: removeEntity()//onEntityPressAndHold: removeEntity()

    MultiResolutionImage {
        id: wallImage
        state: "noContact"
        anchors.fill: parent
        rotation: 0
        transformOrigin: Item.Center // nur das Bild rotiert

        states: [
            State {
                name: "noContact"
                PropertyChanges {
                    target: wallImage;
                    source: "../img/wall/wall_nocontact-sd.png"
                }
            },
            State {
                name: "oneContact"
                PropertyChanges {
                    target: wallImage;
                    source: "../img/wall/wall_onecontact-sd.png"
                }
            },
            State {
                name: "twoContact"
                PropertyChanges {
                    target: wallImage;
                    source: "../img/wall/wall_twocontact-sd.png"
                }
            },
            State {
                name: "threeContact"
                PropertyChanges {
                    target: wallImage;
                    source: "../img/wall/wall_threecontact-sd.png"
                }
            },
            State {
                name: "fourContact"
                PropertyChanges {
                    target: wallImage;
                    source: "../img/wall/wall_fourcontact-sd.png"
                }
            }
        ]
    }

    BoxCollider {
        anchors.centerIn: parent
        height: parent.height * 0.9
        width: parent.width * 0.9
        bodyType: Body.Static
        collisionTestingOnlyMode: true
    }
}

 

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support