aboutsummaryrefslogtreecommitdiffstats
path: root/examples/declarative/particles/plasmapatrol/content
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2012-02-20 10:34:44 +1000
committerQt by Nokia <qt-info@nokia.com>2012-02-24 10:24:58 +0100
commit9d2b618fa022daeabd45e57aa1596197db883037 (patch)
tree90536e9fc088d734439921dde304b49fe7f38df0 /examples/declarative/particles/plasmapatrol/content
parent91d543f00904a6caa2fab850ff3eca12de2d65ac (diff)
Start of examples refactor
This is the general reorg of the examples directory structure, plus additional guidelines. calculator, animations and accessibility have been updated to the new standards and tested, as an example. Task-number: QTBUG-24133 Change-Id: I76c3b86751d3195ba2a5474ff23afb875765e9a4 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
Diffstat (limited to 'examples/declarative/particles/plasmapatrol/content')
-rw-r--r--examples/declarative/particles/plasmapatrol/content/BlasterHardpoint.qml133
-rw-r--r--examples/declarative/particles/plasmapatrol/content/Button.qml66
-rw-r--r--examples/declarative/particles/plasmapatrol/content/CannonHardpoint.qml97
-rw-r--r--examples/declarative/particles/plasmapatrol/content/ChoiceBox.qml105
-rw-r--r--examples/declarative/particles/plasmapatrol/content/Cruiser.qml146
-rw-r--r--examples/declarative/particles/plasmapatrol/content/Frigate.qml114
-rw-r--r--examples/declarative/particles/plasmapatrol/content/Hardpoint.qml114
-rw-r--r--examples/declarative/particles/plasmapatrol/content/HelpScreens.qml268
-rw-r--r--examples/declarative/particles/plasmapatrol/content/LaserHardpoint.qml108
-rw-r--r--examples/declarative/particles/plasmapatrol/content/PlasmaPatrolParticles.qml173
-rw-r--r--examples/declarative/particles/plasmapatrol/content/SequentialLoader.qml54
-rw-r--r--examples/declarative/particles/plasmapatrol/content/Ship.qml114
-rw-r--r--examples/declarative/particles/plasmapatrol/content/Sloop.qml108
-rw-r--r--examples/declarative/particles/plasmapatrol/content/pics/TitleText.pngbin1109 -> 0 bytes
-rw-r--r--examples/declarative/particles/plasmapatrol/content/pics/blur-circle2.pngbin3627 -> 0 bytes
-rw-r--r--examples/declarative/particles/plasmapatrol/content/pics/blur-circle3.pngbin5148 -> 0 bytes
-rw-r--r--examples/declarative/particles/plasmapatrol/content/pics/finalfrontier.pngbin695061 -> 0 bytes
-rw-r--r--examples/declarative/particles/plasmapatrol/content/pics/meteor.pngbin83169 -> 0 bytes
-rw-r--r--examples/declarative/particles/plasmapatrol/content/pics/meteor_explo.pngbin81528 -> 0 bytes
-rw-r--r--examples/declarative/particles/plasmapatrol/content/pics/nullRock.pngbin140 -> 0 bytes
-rw-r--r--examples/declarative/particles/plasmapatrol/content/pics/particle.pngbin861 -> 0 bytes
-rw-r--r--examples/declarative/particles/plasmapatrol/content/pics/star.pngbin1550 -> 0 bytes
-rw-r--r--examples/declarative/particles/plasmapatrol/content/pics/star2.pngbin6507 -> 0 bytes
-rw-r--r--examples/declarative/particles/plasmapatrol/content/pics/star3.pngbin4602 -> 0 bytes
24 files changed, 0 insertions, 1600 deletions
diff --git a/examples/declarative/particles/plasmapatrol/content/BlasterHardpoint.qml b/examples/declarative/particles/plasmapatrol/content/BlasterHardpoint.qml
deleted file mode 100644
index 4ac30d0202..0000000000
--- a/examples/declarative/particles/plasmapatrol/content/BlasterHardpoint.qml
+++ /dev/null
@@ -1,133 +0,0 @@
-/****************************************************************************
-**
-** 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.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 2.0
-import QtQuick.Particles 2.0
-
-Item {
- id: container
- property variant target: {"y": -90, "x":12}
- property Item targetObj: container
- property Item hardpoint: container
- property ParticleSystem system
- property int blasts: 16
- property int bonusBlasts: 12
- property bool show: true
-
- width: 24
- height: 24
- Emitter {
- id: visualization
- group: "blaster"
- system: container.system
- enabled: show
- anchors.fill: parent
- shape: EllipseShape {}
- speed: TargetDirection { targetX: width/2; targetY: width/2; magnitude: -1; proportionalMagnitude: true}
- lifeSpan: 1000
- emitRate: 64
-
- size: 24
- sizeVariation: 24
- endSize: 0
- }
-
- property int blastsLeft: 0
- function fireAt(targetArg, container) {
- target = container.mapFromItem(targetArg, targetArg.width/2, targetArg.height/2);
- targetObj = targetArg;
- hardpoint = container;
- blastsLeft = blasts;
- rofTimer.repeat = true;
- rofTimer.start();
- }
- Timer {
- id: rofTimer
- interval: 30;//Has to be greater than 1 frame or they stack up
- running: false
- repeat: false
- onTriggered: {
- if (targetObj.hp <= 0)
- return;
- //TODO: calculate hit and damage at target, which must be a Ship
- var hit;
- if (blastsLeft >= bonusBlasts)
- hit = Math.random() > targetObj.dodge;
- else
- hit = false; //purely aesthetic shots, because the damage isn't that fine grained
- if (hit == true) {
- switch (targetObj.shipType) {
- case 1: hardpoint.damageDealt += 4; break;
- case 2: hardpoint.damageDealt += 5; break;
- case 3: hardpoint.damageDealt += 1; break;
- default: hardpoint.damageDealt += 100;
- }
- }
- blastVector.targetX = target.x;
- blastVector.targetY = target.y;
- if (!hit) {//TODO: Actual targetVariation
- blastVector.targetX += (128 * Math.random() - 64);
- blastVector.targetY += (128 * Math.random() - 64);
- }
- emitter.burst(1);
- blastsLeft--;
- if (!blastsLeft)
- rofTimer.repeat = false;
- }
- }
- Emitter {
- id: emitter
- group: "blaster"
- enabled: false
- system: container.system
- anchors.centerIn: parent
-
- lifeSpan: 1000
- emitRate: 16
- maximumEmitted: blasts
- size: 24
- endSize:16
- sizeVariation: 8
- speed: TargetDirection {
- id: blastVector
- targetX: target.x; targetY: target.y; magnitude: 1.1; proportionalMagnitude: true
- }
- }
-}
diff --git a/examples/declarative/particles/plasmapatrol/content/Button.qml b/examples/declarative/particles/plasmapatrol/content/Button.qml
deleted file mode 100644
index 405b99304f..0000000000
--- a/examples/declarative/particles/plasmapatrol/content/Button.qml
+++ /dev/null
@@ -1,66 +0,0 @@
-/****************************************************************************
-**
-** 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.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 2.0
-
-//TODO: Add particles to this component too
-Rectangle {
- id: container
- property alias text: txt.text
- signal clicked
- //color: "lightsteelblue"
- gradient: Gradient {
- GradientStop { position: 0.0; color: "lightsteelblue" }
- GradientStop { position: 1.0; color: "steelblue" }
- }
- height: 64
- radius: 16
- width: 128
- Text {
- id: txt
- anchors.centerIn: parent
- font.pixelSize: 24
- color: "white"
- }
- MouseArea {
- anchors.fill: parent
- onClicked: container.clicked()
- }
-}
diff --git a/examples/declarative/particles/plasmapatrol/content/CannonHardpoint.qml b/examples/declarative/particles/plasmapatrol/content/CannonHardpoint.qml
deleted file mode 100644
index c4aa412760..0000000000
--- a/examples/declarative/particles/plasmapatrol/content/CannonHardpoint.qml
+++ /dev/null
@@ -1,97 +0,0 @@
-/****************************************************************************
-**
-** 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.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 2.0
-import QtQuick.Particles 2.0
-
-Item {
- id: container
- property variant target: {"y": -90, "x":12}
- property ParticleSystem system
- property bool show: true
-
- width: 24
- height: 24
- Emitter {
- id: visualization
- group: "cannon"
- enabled: container.show
- system: container.system
- anchors.centerIn: parent
- lifeSpan: 2000
- emitRate: 1
-
- size: 4
- endSize: 0
- }
-
- function fireAt(targetArg, hardpoint) {
- target = container.mapFromItem(targetArg, targetArg.width/2, targetArg.height/2);
- if (container.hp <= 0 || targetArg.hp <= 0)
- return;
- //TODO: calculate hit and damage at target, which must be a Ship
- var hit = Math.random() > targetArg.dodge
- if (hit) {
- switch (targetArg.shipType) {
- case 1: hardpoint.damageDealt += 8; break;
- case 2: hardpoint.damageDealt += 10; break;
- case 3: hardpoint.damageDealt += 16; break;
- default: hardpoint.damageDealt += 1000;
- }
- }
- emitter.burst(1);
- }
- Emitter {
- id: emitter
- group: "cannon"
- enabled: false
- system: container.system
- anchors.centerIn: parent
-
- lifeSpan: 1000
- emitRate: 1
- size: 8
- endSize: 4
- speed: TargetDirection {
- id: blastVector
- targetX: target.x; targetY: target.y; magnitude: 1.1; proportionalMagnitude: true
- }
- }
-}
diff --git a/examples/declarative/particles/plasmapatrol/content/ChoiceBox.qml b/examples/declarative/particles/plasmapatrol/content/ChoiceBox.qml
deleted file mode 100644
index a678bc9dd4..0000000000
--- a/examples/declarative/particles/plasmapatrol/content/ChoiceBox.qml
+++ /dev/null
@@ -1,105 +0,0 @@
-/****************************************************************************
-**
-** 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.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 2.0
-import QtQuick.Particles 2.0
-
-Item {
- id: container
- width: 360
- height: 160
- property ParticleSystem system
- Ship {
- id: nully
- system: system
- }
- property Item target: nully
- /*
- Component.onCompleted: {
- container.target.shipType = 1
- container.target.gunType = 1
- }
- */
- Row {
- anchors.horizontalCenter: parent.horizontalCenter
- height: parent.height
- spacing: 8
- Button {
- width: 80
- height: 80
- anchors.verticalCenter: parent.verticalCenter
- text: "Cycle\nShip"
- onClicked: {
- var nextVal = container.target.shipType;
- if(nextVal == 3)
- nextVal = 1;
- else
- nextVal++;
- container.target.shipType = nextVal;
- }
- }
- Item {
- width: 128
- height: 128
- anchors.verticalCenter: parent.verticalCenter
- Ship {
- hp: 20
- anchors.centerIn: parent
- shipType: container.target.shipType
- gunType: container.target.gunType
- system: container.system
- }
- }
- Button {
- width: 80
- height: 80
- anchors.verticalCenter: parent.verticalCenter
- text: "Cycle\nGun"
- onClicked: {
- var nextVal = container.target.gunType;
- if(nextVal == 3)
- nextVal = 1;
- else
- nextVal++;
- container.target.gunType = nextVal;
- }
- }
- }
-}
diff --git a/examples/declarative/particles/plasmapatrol/content/Cruiser.qml b/examples/declarative/particles/plasmapatrol/content/Cruiser.qml
deleted file mode 100644
index c689879dce..0000000000
--- a/examples/declarative/particles/plasmapatrol/content/Cruiser.qml
+++ /dev/null
@@ -1,146 +0,0 @@
-/****************************************************************************
-**
-** 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.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 2.0
-import QtQuick.Particles 2.0
-
-Item {
- id: container
- property int maxHP: 100
- property int hp: maxHP
- property real initialDodge: 0.01
- property real dodge: initialDodge
- onHpChanged: if(hp <= 0) target = container;
- property ParticleSystem system//TODO: Ship abstraction
- property Item target: container
- property string shipParticle: "default"//Per team colors?
- property int gunType: 0
- width: 128
- height: 128
- Emitter {
- //TODO: Cooler would be an 'orbiting' affector
- //TODO: On the subject, opacity and size should be grouped type 'overLife' if we can cram that in the particles
- system: container.system
- group: container.shipParticle
- anchors.centerIn: parent
- width: 64
- height: 64
- shape: EllipseShape {}
-
- emitRate: hp > 0 ? hp * 1 + 20 : 0
- lifeSpan: 2400
- maximumEmitted: (maxHP * 1 + 20)*2.4
-
- size: 48
- sizeVariation: 16
- endSize: 16
-
- speed: AngleDirection {angleVariation:360; magnitudeVariation: 32}
- }
- Emitter {
- system: container.system
- group: "cruiserArmor"
- anchors.fill: parent
- shape: EllipseShape { fill: false }
- enabled: hp>0
-
- emitRate: 16
- lifeSpan: 2000
-
- size: 48
- sizeVariation: 24
-
- SpriteGoal {
- id: destructor
- system: container.system
- enabled: container.hp <=0
- anchors.fill: parent
- groups: ["cruiserArmor"]
- goalState: "death"
-// jump: true
- once: true
- }
- }
-
- Timer {
- id: fireControl
- property int next: Math.floor(Math.random() * 3) + 1
- interval: 800
- running: root.readySetGo
- repeat: true
- onTriggered: {
- if (next == 1) {
- gun1.fireAt(container.target);
- next = Math.floor(Math.random() * 3) + 1;
- } else if (next == 2) {
- gun2.fireAt(container.target);
- next = Math.floor(Math.random() * 3) + 1;
- } else if (next == 3) {
- gun3.fireAt(container.target);
- next = Math.floor(Math.random() * 3) + 1;
- }
- }
- }
-
- Hardpoint {//TODO: Hardpoint abstraction
- x: 112 - 12 - 8*2
- y: 128 - 12 - 12*2
- id: gun1
- system: container.system
- show: hp > 0
- hardpointType: gunType
- }
- Hardpoint {
- x: 64 - 12
- y: 0 - 12 + 12*2
- id: gun2
- system: container.system
- show: hp > 0
- hardpointType: gunType
- }
- Hardpoint {
- x: 16 - 12 + 8*2
- y: 128 - 12 - 12*2
- id: gun3
- system: container.system
- show: hp > 0
- hardpointType: gunType
- }
-}
diff --git a/examples/declarative/particles/plasmapatrol/content/Frigate.qml b/examples/declarative/particles/plasmapatrol/content/Frigate.qml
deleted file mode 100644
index de099bed72..0000000000
--- a/examples/declarative/particles/plasmapatrol/content/Frigate.qml
+++ /dev/null
@@ -1,114 +0,0 @@
-/****************************************************************************
-**
-** 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.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 2.0
-import QtQuick.Particles 2.0
-
-Item {
- id: container
- property int maxHP: 100
- property int hp: maxHP
- property real initialDodge: 0.2
- property real dodge: initialDodge
- onHpChanged: if(hp <= 0) target = container;
- property ParticleSystem system//TODO: Ship abstraction
- property Item target: container
- property string shipParticle: "default"//Per team colors?
- property int gunType: 0
- width: 128
- height: 128
- Emitter {
- system: container.system
- group: "frigateShield"
- anchors.centerIn: parent
- size: 92
- emitRate: 1
- lifeSpan: 4800
- enabled: hp > 0
- }
- Emitter {
- system: container.system
- group: container.shipParticle
- anchors.centerIn: parent
- width: 64
- height: 16
- shape: EllipseShape {}
-
- size: 16
- sizeVariation: 8
- endSize: 8
- emitRate: hp > 0 ? hp * 1 + 20 : 0
- lifeSpan: 1200
- maximumEmitted: (maxHP * 1 + 20)*2
- }
- Timer {
- id: fireControl
- property int next: Math.floor(Math.random() * 2) + 1
- interval: 800
- running: root.readySetGo
- repeat: true
- onTriggered: {
- if (next == 1) {
- gun1.fireAt(container.target);
- next = Math.floor(Math.random() * 2) + 1;
- } else if (next == 2) {
- gun2.fireAt(container.target);
- next = Math.floor(Math.random() * 2) + 1;
- }
- }
- }
-
- Hardpoint {
- x: 128 - 32 - 12
- y: 64 - 12
- id: gun1
- system: container.system
- show: hp > 0
- hardpointType: gunType
- }
- Hardpoint {
- x: 0 + 32 - 12
- y: 64 - 12
- id: gun2
- system: container.system
- show: hp > 0
- hardpointType: gunType
- }
-}
diff --git a/examples/declarative/particles/plasmapatrol/content/Hardpoint.qml b/examples/declarative/particles/plasmapatrol/content/Hardpoint.qml
deleted file mode 100644
index 5c7fb5521b..0000000000
--- a/examples/declarative/particles/plasmapatrol/content/Hardpoint.qml
+++ /dev/null
@@ -1,114 +0,0 @@
-/****************************************************************************
-**
-** 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.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 2.0
-import QtQuick.Particles 2.0
-
-Item {
- id: container
- //ReflectiveProperties
- //TransferredProperties
- property variant target: {"y": -90, "x":12}
- property ParticleSystem system
- property bool show: true
- property int hardpointType: 0 //default is pea shooter - always bad.
-
- property Item targetObj: null
- property int damageDealt: 0
- onDamageDealtChanged: dealDamageTimer.start();
- Timer {
- id: dealDamageTimer
- interval: 16
- running: false
- repeat: false
- onTriggered: {targetObj.hp -= damageDealt; damageDealt = 0;}
- }
- width: 24
- height: 24
- function fireAt(targetArg) {//Each implement own
- if (targetArg != null) {
- hardpointLoader.item.fireAt(targetArg, container);
- targetObj = targetArg;
- }
- }
- Loader {
- id: hardpointLoader
- sourceComponent: {
- switch (hardpointType) {
- case 1: laserComponent; break;
- case 2: blasterComponent; break;
- case 3: cannonComponent; break;
- default: emptyComponent;
- }
- }
- }
- Component {
- id: laserComponent
- LaserHardpoint {
- target: container.target
- system: container.system
- show: container.show
- }
- }
- Component {
- id: blasterComponent
- BlasterHardpoint {
- target: container.target
- system: container.system
- show: container.show
- }
- }
- Component {
- id: cannonComponent
- CannonHardpoint {
- target: container.target
- system: container.system
- show: container.show
- }
- }
- Component {
- id: emptyComponent
- Item {
- function fireAt(obj) {
- console.log("Firing null weapon. It hurts.");
- }
- }
- }
-}
diff --git a/examples/declarative/particles/plasmapatrol/content/HelpScreens.qml b/examples/declarative/particles/plasmapatrol/content/HelpScreens.qml
deleted file mode 100644
index 9297f86f31..0000000000
--- a/examples/declarative/particles/plasmapatrol/content/HelpScreens.qml
+++ /dev/null
@@ -1,268 +0,0 @@
-/****************************************************************************
-**
-** 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.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 2.0
-import QtQuick.Particles 2.0
-
-SequentialLoader {
- id: hLdr
- signal exitDesired
- Component.onCompleted: advance();
- ParticleSystem { id: helpSystem }
- PlasmaPatrolParticles { sys: helpSystem }
- pages: [
- Component {Item {
- id: story
- Text {
- color: "white"
- text: "Story"
- font.pixelSize: 48
- }
- /*
- Flickable {
- y: 60
- width: 360
- height: 500
- contentHeight: txt1.height
- contentWidth: 360//TODO: Less magic numbers?
- */
- Text {
- id: txt1
- color: "white"
- y: 60
- font.pixelSize: 18
- text: "
-In a remote nebula, a race of energy beings formed and lived prosperous lives for millenia. Until the schism - when they became constantly at each other's energy-throats. War soon followed, crippling both sides, until a truce was formed. But while governments knew the desparate need for peace, the soldiers in the ion-field were still filled with rampant bloodlust. On the border, patrols are constantly engaging in minor skirmishes whenever they cross paths.
-
-You must select one such patrol unit for the border, heading into an inevitable skirmish, in Plasma Patrol: the game of energy being spaceship combat!
- "
- width: 360
- wrapMode: Text.WordWrap
- }
- // }
- Button {
- x: 20
- y: 560
- height: 40
- width: 120
- text: "Next"
- onClicked: hLdr.advance();
- }
- Button {
- x: 220
- y: 560
- height: 40
- width: 120
- text: "Menu"
- onClicked: hLdr.exitDesired();
- }
- }},
- Component {Item {
- id: ships
- Text {
- color: "white"
- text: "Vessels"
- font.pixelSize: 48
- }
- Column {
- spacing: 16
- y: 60
- Row {
- height: 128
- Sloop {
- system: helpSystem
- }
- Text {
- text: "The nimble sloop"
- color: "white"
- font.pixelSize: 18
- }
- }
- Row {
- height: 128
- Frigate {
- system: helpSystem
- }
- Text {
- text: "The versitile shield frigate"
- color: "white"
- font.pixelSize: 18
- }
- }
- Row {
- height: 128
- Cruiser {
- system: helpSystem
- }
- Text {
- text: "The armored cruiser"
- color: "white"
- font.pixelSize: 18
- }
- }
- }
- Button {
- x: 20
- y: 560
- height: 40
- width: 120
- text: "Next"
- onClicked: hLdr.advance();
- }
- Button {
- x: 220
- y: 560
- height: 40
- width: 120
- text: "Menu"
- onClicked: hLdr.exitDesired();
- }
- }},
- Component {Item {
- id: guns
- Text {
- color: "white"
- text: "Hardpoints"
- font.pixelSize: 48
- }
- Column {
- spacing: 16
- y: 60
- Row {
- height: 128
- LaserHardpoint {
- system: helpSystem
- }
- Text {
- text: "The laser hardpoint almost always hits the target, even the nimble sloop, but loses much of its potency against the frigate's shields"
- width: 332
- wrapMode: Text.WordWrap
- color: "white"
- font.pixelSize: 18
- }
- }
- Row {
- height: 128
- BlasterHardpoint {
- system: helpSystem
- }
- Text {
- text: "The blaster passes right through the frigate's shields but loses much of its impact against the armor of the cruiser"
- width: 332
- wrapMode: Text.WordWrap
- color: "white"
- font.pixelSize: 18
- }
- }
- Row {
- height: 128
- CannonHardpoint {
- system: helpSystem
- }
- Text {
- text: "The cannon has poor accuracy, often missing the nimble sloop, but can punch right through the armor of the cruiser"
- width: 332
- wrapMode: Text.WordWrap
- color: "white"
- font.pixelSize: 18
- }
- }
- }
- Button {
- x: 20
- y: 560
- height: 40
- width: 120
- text: "Next"
- onClicked: hLdr.advance();
- }
- Button {
- x: 220
- y: 560
- height: 40
- width: 120
- text: "Menu"
- onClicked: hLdr.exitDesired();
- }
- }},
- Component {Item {
- id: strategy
- Text {
- color: "white"
- text: "Strategy"
- font.pixelSize: 48
- }
- Flickable {
- y: 60
- width: 360
- height: 500
- contentHeight: txt1.height
- contentWidth: 360//TODO: Less magic numbers?
- Text {
- id: txt1
- color: "white"
- font.pixelSize: 18
- text: "
-Basic Strategy: Good luck, have fun - don't die.
-More to come after thorough playtesting.
- "
- width: 360
- wrapMode: Text.WordWrap
- }
- }
- Button {
- x: 20
- y: 560
- height: 40
- width: 120
- text: "Story"
- onClicked: {hLdr.at=0; hLdr.advance();}
- }
- Button {
- x: 220
- y: 560
- height: 40
- width: 120
- text: "Menu"
- onClicked: hLdr.exitDesired();
- }
- }}
- ]
-}
diff --git a/examples/declarative/particles/plasmapatrol/content/LaserHardpoint.qml b/examples/declarative/particles/plasmapatrol/content/LaserHardpoint.qml
deleted file mode 100644
index 87ac3e9e62..0000000000
--- a/examples/declarative/particles/plasmapatrol/content/LaserHardpoint.qml
+++ /dev/null
@@ -1,108 +0,0 @@
-/****************************************************************************
-**
-** 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.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 2.0
-import QtQuick.Particles 2.0
-
-Item {
- id: container
- property variant target: {"y": -90, "x":12}
- property ParticleSystem system
- property bool show: true
-
- width: 24
- height: 24
- Emitter {
- id: visualization
- group: "laser"
- system: container.system
- anchors.fill: parent
- enabled: container.show
- shape: EllipseShape {}
- speed: TargetDirection { targetX: width/2; targetY: width/2; magnitude: -1; proportionalMagnitude: true }
- lifeSpan: 1000
- emitRate: 64
-
- size: 24
- sizeVariation: 8
- endSize: 8
- }
-
- function fireAt(targetArg, hardpoint) {
- if (targetArg.hp <= 0)
- return;
- //TODO: calculate hit and damage at target, which must be a Ship
- var offset = 0;
- if (Math.random() < 0.99) {
- switch (targetArg.shipType) {
- case 1: hardpoint.damageDealt += 16; break;
- case 2: hardpoint.damageDealt += 4; break;
- case 3: hardpoint.damageDealt += 8; break;
- default: hardpoint.damageDealt += 500; //Really effective against unregistered vessels
- }
- } else {//Misses with Lasers are really rare
- offset = Math.random() * 100;
- }
- target = container.mapFromItem(targetArg, offset + targetArg.width/2, offset + targetArg.height/2);
- emitter.pulse(100);
- // console.log("Fire box: " + Math.min(container.width/2, target.x) + "," + Math.min(container.height/2, target.y) + " " + (Math.max(container.width/2, target.x) - Math.min(container.width/2, target.x)) + "," + (Math.max(container.height/2, target.y) - Math.min(container.height/2, target.y)));
- }
- Emitter {
- id: emitter
- group: "laser"
- enabled: false
- system: container.system
- x: Math.min(container.width/2, target.x);
- width: Math.max(container.width/2, target.x) - x;
- y: Math.min(container.height/2, target.y);
- height: Math.max(container.height/2, target.y) - y;
- shape: LineShape {
- mirrored: (emitter.y < 0 || emitter.x < 0) && !(emitter.y < 0 && emitter.x < 0 )//I just want XOR
- }
-
- lifeSpan: 1000
- emitRate: 8000
- maximumEmitted: 800
- size: 16
- endSize: 0
-
- speed: PointDirection {xVariation: 4; yVariation: 4}
- }
-}
diff --git a/examples/declarative/particles/plasmapatrol/content/PlasmaPatrolParticles.qml b/examples/declarative/particles/plasmapatrol/content/PlasmaPatrolParticles.qml
deleted file mode 100644
index 95d4bcd2b9..0000000000
--- a/examples/declarative/particles/plasmapatrol/content/PlasmaPatrolParticles.qml
+++ /dev/null
@@ -1,173 +0,0 @@
-/****************************************************************************
-**
-** 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.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 2.0
-import QtQuick.Particles 2.0
-
-Item {
- property ParticleSystem sys
- ImageParticle {
- system: sys
- groups: ["default"]
- source: "pics/blur-circle3.png"
- color: "#003A3A3A"
- colorVariation: 0.1
- z: 0
- }
- ImageParticle {
- system: sys
- groups: ["redTeam"]
- source: "pics/blur-circle3.png"
- color: "#0028060A"
- colorVariation: 0.1
- z: 0
- }
- ImageParticle {
- system: sys
- groups: ["greenTeam"]
- source: "pics/blur-circle3.png"
- color: "#0006280A"
- colorVariation: 0.1
- z: 0
- }
- ImageParticle {
- system: sys
- groups: ["blaster"]
- source: "pics/star2.png"
- //color: "#0F282406"
- color: "#0F484416"
- colorVariation: 0.2
- z: 2
- }
- ImageParticle {
- system: sys
- groups: ["laser"]
- source: "pics/star3.png"
- //color: "#00123F68"
- color: "#00428FF8"
- colorVariation: 0.2
- z: 2
- }
- ImageParticle {
- system: sys
- groups: ["cannon"]
- source: "pics/particle.png"
- color: "#80FFAAFF"
- colorVariation: 0.1
- z: 2
- }
- ImageParticle {
- system: sys
- groups: ["cannonCore"]
- source: "pics/particle.png"
- color: "#00666666"
- colorVariation: 0.8
- z: 1
- }
- ImageParticle {
- system: sys
- groups: ["cannonWake"]
- source: "pics/star.png"
- color: "#00CCCCCC"
- colorVariation: 0.2
- z: 1
- }
- ImageParticle {
- system: sys
- groups: ["frigateShield"]
- source: "pics/blur-circle2.png"
- color: "#00000000"
- colorVariation: 0.05
- blueVariation: 0.5
- greenVariation: 0.1
- z: 3
- }
- ImageParticle {
- system: sys
- groups: ["cruiserArmor"]
- z: 1
- sprites:[Sprite {
- id: spinState
- name: "spinning"
- source: "pics/meteor.png"
- frames: 35
- frameDuration: 40
- to: {"death":0, "spinning":1}
- },Sprite {
- name: "death"
- source: "pics/meteor_explo.png"
- frames: 22
- frameDuration: 40
- to: {"null":1}
- }, Sprite {
- name: "null"
- source: "pics/nullRock.png"
- frames: 1
- frameDuration: 1000
- }
- ]
- }
- TrailEmitter {
- system: sys
- group: "cannonWake"
- follow: "cannon"
- emitRatePerParticle: 64
- lifeSpan: 600
- speed: AngleDirection { angleVariation: 360; magnitude: 48}
- size: 16
- endSize: 8
- sizeVariation: 2
- enabled: true
- width: 1000//XXX: Terrible hack
- height: 1000
- }
- TrailEmitter {
- system: sys
- group: "cannonCore"
- follow: "cannon"
- emitRatePerParticle: 256
- lifeSpan: 128
- size: 24
- endSize: 8
- enabled: true
- width: 1000//XXX: Terrible hack
- height: 1000
- }
-}
diff --git a/examples/declarative/particles/plasmapatrol/content/SequentialLoader.qml b/examples/declarative/particles/plasmapatrol/content/SequentialLoader.qml
deleted file mode 100644
index eaef87fe57..0000000000
--- a/examples/declarative/particles/plasmapatrol/content/SequentialLoader.qml
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************************
-**
-** 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.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 2.0
-
-Item {
- id: container
- //TODO: Somehow get particles into this?
- property list<Component> pages
- property Item cur: null
- property int at: 0
- function advance() {
- if(cur != null)
- cur.destroy();
- cur = pages[at++].createObject(container);
- }
-}
diff --git a/examples/declarative/particles/plasmapatrol/content/Ship.qml b/examples/declarative/particles/plasmapatrol/content/Ship.qml
deleted file mode 100644
index a928cd2a2e..0000000000
--- a/examples/declarative/particles/plasmapatrol/content/Ship.qml
+++ /dev/null
@@ -1,114 +0,0 @@
-/****************************************************************************
-**
-** 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.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 2.0
-import QtQuick.Particles 2.0
-
-Item {
- id: me
- //Reflective Properties
- width: shipLoader.width
- height: shipLoader.height
- //Transfered Properties
- property int hp: 100//shipLoader.item.maxHP
- property real dodge: shipLoader.item.initialDodge
- property ParticleSystem system
- property int targetIdx: 0
- property Item target: targets[targetIdx] == undefined?null:targets[targetIdx]
- Connections {
- target: me.target
- onHpChanged: if (me.target.hp<=0) me.targetIdx++;
- }
- property list<Item> targets
- property string shipParticle: "default"//Per team colors?
- property int gunType: 0
- property int shipType: 0
- Component {
- id: sloopComp
- Sloop {
- system: me.system
- target: me.target
- shipParticle: me.shipParticle
- gunType: me.gunType
- hp: me.hp
- dodge: me.dodge
- }
- }
- Component {
- id: frigateComp
- Frigate {
- system: me.system
- target: me.target
- shipParticle: me.shipParticle
- gunType: me.gunType
- hp: me.hp
- dodge: me.dodge
- }
- }
- Component {
- id: cruiserComp
- Cruiser {
- system: me.system
- target: me.target
- shipParticle: me.shipParticle
- gunType: me.gunType
- hp: me.hp
- dodge: me.dodge
- }
- }
- Component {
- id: dumbComp
- Item {
- property int maxHP: 0
- property int initialDodge: 0
- }
- }
- Loader {
- id: shipLoader
- sourceComponent: {
- switch (shipType) {
- case 1: sloopComp; break;
- case 2: frigateComp; break;
- case 3: cruiserComp; break;
- default: dumbComp;
- }
- }
- }
-}
diff --git a/examples/declarative/particles/plasmapatrol/content/Sloop.qml b/examples/declarative/particles/plasmapatrol/content/Sloop.qml
deleted file mode 100644
index c6b1183162..0000000000
--- a/examples/declarative/particles/plasmapatrol/content/Sloop.qml
+++ /dev/null
@@ -1,108 +0,0 @@
-/****************************************************************************
-**
-** 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.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 2.0
-import QtQuick.Particles 2.0
-
-Item {
- id: container
- property int maxHP: 100
- property int hp: maxHP
- property real initialDodge: 0.5
- property real dodge: initialDodge
- property int blinkInterval: 800
- onHpChanged: if(hp <= 0) target = container;
- property ParticleSystem system//TODO: Ship abstraction
- property Item target: container
- property string shipParticle: "default"//Per team colors?
- property int gunType: 0
- width: 128
- height: 128
- Emitter {
- id: emitter
- //TODO: Cooler would be an 'orbiting' affector
- //TODO: On the subject, opacity and size should be grouped type 'overLife' if we can cram that in the particles
- system: container.system
- group: container.shipParticle
- shape: EllipseShape {}
-
- emitRate: hp > 0 ? hp + 20 : 0
- lifeSpan: blinkInterval
- maximumEmitted: (maxHP + 20)
-
- acceleration: AngleDirection {angleVariation: 360; magnitude: 8}
-
- size: 24
- endSize: 4
- sizeVariation: 8
- width: 16
- height: 16
- x: 64
- y: 64
- Behavior on x {NumberAnimation {duration:blinkInterval}}
- Behavior on y {NumberAnimation {duration:blinkInterval}}
- Timer {
- interval: blinkInterval
- running: true
- repeat: true
- onTriggered: {
- emitter.x = Math.random() * 48 + 32
- emitter.y = Math.random() * 48 + 32
- }
- }
- }
- Hardpoint {
- anchors.centerIn: parent
- id: gun2
- system: container.system
- show: container.hp > 0
- hardpointType: gunType
- }
- Timer {
- id: fireControl
- interval: 800
- running: root.readySetGo
- repeat: true
- onTriggered: {
- gun2.fireAt(container.target);
- }
- }
-
-}
diff --git a/examples/declarative/particles/plasmapatrol/content/pics/TitleText.png b/examples/declarative/particles/plasmapatrol/content/pics/TitleText.png
deleted file mode 100644
index dc3acebe39..0000000000
--- a/examples/declarative/particles/plasmapatrol/content/pics/TitleText.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/particles/plasmapatrol/content/pics/blur-circle2.png b/examples/declarative/particles/plasmapatrol/content/pics/blur-circle2.png
deleted file mode 100644
index f7c9f3e98e..0000000000
--- a/examples/declarative/particles/plasmapatrol/content/pics/blur-circle2.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/particles/plasmapatrol/content/pics/blur-circle3.png b/examples/declarative/particles/plasmapatrol/content/pics/blur-circle3.png
deleted file mode 100644
index dbc39cb16e..0000000000
--- a/examples/declarative/particles/plasmapatrol/content/pics/blur-circle3.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/particles/plasmapatrol/content/pics/finalfrontier.png b/examples/declarative/particles/plasmapatrol/content/pics/finalfrontier.png
deleted file mode 100644
index 2ba1815230..0000000000
--- a/examples/declarative/particles/plasmapatrol/content/pics/finalfrontier.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/particles/plasmapatrol/content/pics/meteor.png b/examples/declarative/particles/plasmapatrol/content/pics/meteor.png
deleted file mode 100644
index e8c368aea7..0000000000
--- a/examples/declarative/particles/plasmapatrol/content/pics/meteor.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/particles/plasmapatrol/content/pics/meteor_explo.png b/examples/declarative/particles/plasmapatrol/content/pics/meteor_explo.png
deleted file mode 100644
index 4297245d49..0000000000
--- a/examples/declarative/particles/plasmapatrol/content/pics/meteor_explo.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/particles/plasmapatrol/content/pics/nullRock.png b/examples/declarative/particles/plasmapatrol/content/pics/nullRock.png
deleted file mode 100644
index 4076327a1a..0000000000
--- a/examples/declarative/particles/plasmapatrol/content/pics/nullRock.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/particles/plasmapatrol/content/pics/particle.png b/examples/declarative/particles/plasmapatrol/content/pics/particle.png
deleted file mode 100644
index 5c83896d22..0000000000
--- a/examples/declarative/particles/plasmapatrol/content/pics/particle.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/particles/plasmapatrol/content/pics/star.png b/examples/declarative/particles/plasmapatrol/content/pics/star.png
deleted file mode 100644
index 0d592cfa87..0000000000
--- a/examples/declarative/particles/plasmapatrol/content/pics/star.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/particles/plasmapatrol/content/pics/star2.png b/examples/declarative/particles/plasmapatrol/content/pics/star2.png
deleted file mode 100644
index bb55c44788..0000000000
--- a/examples/declarative/particles/plasmapatrol/content/pics/star2.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/particles/plasmapatrol/content/pics/star3.png b/examples/declarative/particles/plasmapatrol/content/pics/star3.png
deleted file mode 100644
index 636a25f480..0000000000
--- a/examples/declarative/particles/plasmapatrol/content/pics/star3.png
+++ /dev/null
Binary files differ