X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=examples%2Fdeclarative%2Fparticles%2Fplasmapatrol%2Fcontent%2FShip.qml;h=a928cd2a2eb1b15982a7b8a5b976a148fddb007e;hb=45b14259fc0cf704692df1c00da511527d1fba1d;hp=60fc311d47be8de27f0de7b6449ac55ae2b17025;hpb=5f0c8f13b86885faa830ce867c42d0c02a7e453f;p=profile%2Fivi%2Fqtdeclarative.git diff --git a/examples/declarative/particles/plasmapatrol/content/Ship.qml b/examples/declarative/particles/plasmapatrol/content/Ship.qml index 60fc311..a928cd2 100644 --- a/examples/declarative/particles/plasmapatrol/content/Ship.qml +++ b/examples/declarative/particles/plasmapatrol/content/Ship.qml @@ -1,8 +1,7 @@ /**************************************************************************** ** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ ** ** This file is part of the QtDeclarative module of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -52,17 +52,17 @@ Item { property ParticleSystem system property int targetIdx: 0 property Item target: targets[targetIdx] == undefined?null:targets[targetIdx] - Connections{ + Connections { target: me.target - onHpChanged: if(me.target.hp<=0) me.targetIdx++; + onHpChanged: if (me.target.hp<=0) me.targetIdx++; } property list targets property string shipParticle: "default"//Per team colors? property int gunType: 0 property int shipType: 0 - Component{ + Component { id: sloopComp - Sloop{ + Sloop { system: me.system target: me.target shipParticle: me.shipParticle @@ -71,9 +71,9 @@ Item { dodge: me.dodge } } - Component{ + Component { id: frigateComp - Frigate{ + Frigate { system: me.system target: me.target shipParticle: me.shipParticle @@ -82,9 +82,9 @@ Item { dodge: me.dodge } } - Component{ + Component { id: cruiserComp - Cruiser{ + Cruiser { system: me.system target: me.target shipParticle: me.shipParticle @@ -93,21 +93,22 @@ Item { dodge: me.dodge } } - Component{ + Component { id: dumbComp - Item{ + Item { property int maxHP: 0 property int initialDodge: 0 } } - Loader{ + Loader { id: shipLoader - sourceComponent:{ switch(shipType){ + sourceComponent: { + switch (shipType) { case 1: sloopComp; break; case 2: frigateComp; break; case 3: cruiserComp; break; default: dumbComp; - } + } } } }