diff options
Diffstat (limited to 'demos')
5 files changed, 10 insertions, 9 deletions
diff --git a/demos/declarative/samegame/SamegameCore/BoomBlock.qml b/demos/declarative/samegame/SamegameCore/BoomBlock.qml index da51230..009aeca 100644 --- a/demos/declarative/samegame/SamegameCore/BoomBlock.qml +++ b/demos/declarative/samegame/SamegameCore/BoomBlock.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import QtQuick 1.0 +import QtQuick 1.1 import Qt.labs.particles 1.0 Item { diff --git a/demos/declarative/samegame/SamegameCore/Button.qml b/demos/declarative/samegame/SamegameCore/Button.qml index aea4e53..b2b232c 100644 --- a/demos/declarative/samegame/SamegameCore/Button.qml +++ b/demos/declarative/samegame/SamegameCore/Button.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import QtQuick 1.0 +import QtQuick 1.1 Rectangle { id: container diff --git a/demos/declarative/samegame/SamegameCore/Dialog.qml b/demos/declarative/samegame/SamegameCore/Dialog.qml index b11c65c..ecac475 100644 --- a/demos/declarative/samegame/SamegameCore/Dialog.qml +++ b/demos/declarative/samegame/SamegameCore/Dialog.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import QtQuick 1.0 +import QtQuick 1.1 Rectangle { id: page diff --git a/demos/declarative/samegame/SamegameCore/samegame.js b/demos/declarative/samegame/SamegameCore/samegame.js index 9266767..b838790 100755 --- a/demos/declarative/samegame/SamegameCore/samegame.js +++ b/demos/declarative/samegame/SamegameCore/samegame.js @@ -177,18 +177,19 @@ function createBlock(column,row){ // not be ready immediately. There is a statusChanged signal on the // component you could use if you want to wait to load remote files. if(component.status == Component.Ready){ - var dynamicObject = component.createObject(gameCanvas); + var dynamicObject = component.createObject(gameCanvas, + {"type": Math.floor(Math.random() * 3), + "x": column*gameCanvas.blockSize, + "width": gameCanvas.blockSize, + "height": gameCanvas.blockSize}); if(dynamicObject == null){ console.log("error creating block"); console.log(component.errorString()); return false; } - dynamicObject.type = Math.floor(Math.random() * 3); - dynamicObject.x = column*gameCanvas.blockSize; dynamicObject.y = row*gameCanvas.blockSize; - dynamicObject.width = gameCanvas.blockSize; - dynamicObject.height = gameCanvas.blockSize; dynamicObject.spawned = true; + board[index(column,row)] = dynamicObject; }else{ console.log("error loading block component"); diff --git a/demos/declarative/samegame/samegame.qml b/demos/declarative/samegame/samegame.qml index ebb8e4a..ab64156 100644 --- a/demos/declarative/samegame/samegame.qml +++ b/demos/declarative/samegame/samegame.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import QtQuick 1.0 +import QtQuick 1.1 import "SamegameCore" import "SamegameCore/samegame.js" as Logic |