aboutsummaryrefslogtreecommitdiffstats
path: root/examples/declarative/particles/plasmapatrol/content/CannonHardpoint.qml
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2011-09-20 17:16:36 +1000
committerQt by Nokia <qt-info@nokia.com>2011-09-21 07:11:25 +0200
commitc07ea77a6201ef5595ff5714fba891be4408fa9a (patch)
treea76327735961f81130bffeeb9a62f2fcb7fec8bb /examples/declarative/particles/plasmapatrol/content/CannonHardpoint.qml
parentef98f5a80369e3f014585edc3dd63a2ec331d1ea (diff)
Add whitespace
Change-Id: Iad55228ffa86bbf63b12a33d0f00ce734807c071 Reviewed-on: http://codereview.qt-project.org/5199 Reviewed-by: Bea Lam <bea.lam@nokia.com>
Diffstat (limited to 'examples/declarative/particles/plasmapatrol/content/CannonHardpoint.qml')
-rw-r--r--examples/declarative/particles/plasmapatrol/content/CannonHardpoint.qml14
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/declarative/particles/plasmapatrol/content/CannonHardpoint.qml b/examples/declarative/particles/plasmapatrol/content/CannonHardpoint.qml
index dc15f0cae1..48f7dd045b 100644
--- a/examples/declarative/particles/plasmapatrol/content/CannonHardpoint.qml
+++ b/examples/declarative/particles/plasmapatrol/content/CannonHardpoint.qml
@@ -49,7 +49,7 @@ Item {
width: 24
height: 24
- Emitter{
+ Emitter {
id: visualization
group: "cannon"
enabled: container.show
@@ -62,14 +62,14 @@ Item {
endSize: 0
}
- function fireAt(targetArg, hardpoint){
+ function fireAt(targetArg, hardpoint) {
target = container.mapFromItem(targetArg, targetArg.width/2, targetArg.height/2);
- if(container.hp <= 0 || targetArg.hp <= 0)
+ 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){
+ if (hit) {
+ switch (targetArg.shipType) {
case 1: hardpoint.damageDealt += 8; break;
case 2: hardpoint.damageDealt += 10; break;
case 3: hardpoint.damageDealt += 16; break;
@@ -78,7 +78,7 @@ Item {
}
emitter.burst(1);
}
- Emitter{
+ Emitter {
id: emitter
group: "cannon"
enabled: false
@@ -89,7 +89,7 @@ Item {
emitRate: 1
size: 8
endSize: 4
- speed: TargetDirection{
+ speed: TargetDirection {
id: blastVector
targetX: target.x; targetY: target.y; magnitude: 1.1; proportionalMagnitude: true
}