diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2011-09-13 09:39:11 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-09-13 04:53:33 +0200 |
commit | 29993ff8e91715bdfbaf964c91e07a112f6d2a24 (patch) | |
tree | 46a7b25ba1091f1d6ada9decaa9bf9d77d3a8004 /examples/declarative/plasmapatrol | |
parent | 4dba5720e03542e0989adad2461358074c7d0dee (diff) |
Refactor SpriteEngine out of StochasticEngine
Also add ParticleGroups which use only StochasticStates
Simplistic change for now, just to focus the API for the
particle system. ParticleGroup elements replace the particleStates
property on the system, and the term "group" is now used more
consistently.
Change-Id: I6456f9c521b8166ccd94ea953275557bcfbf6423
Reviewed-on: http://codereview.qt-project.org/4699
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
Diffstat (limited to 'examples/declarative/plasmapatrol')
8 files changed, 25 insertions, 25 deletions
diff --git a/examples/declarative/plasmapatrol/content/BlasterHardpoint.qml b/examples/declarative/plasmapatrol/content/BlasterHardpoint.qml index 384275fc94..3e751f4e15 100644 --- a/examples/declarative/plasmapatrol/content/BlasterHardpoint.qml +++ b/examples/declarative/plasmapatrol/content/BlasterHardpoint.qml @@ -55,7 +55,7 @@ Item { height: 24 Emitter{ id: visualization - particle: "blaster" + group: "blaster" system: container.system enabled: show anchors.fill: parent @@ -114,7 +114,7 @@ Item { } Emitter{ id: emitter - particle: "blaster" + group: "blaster" enabled: false system: container.system anchors.centerIn: parent diff --git a/examples/declarative/plasmapatrol/content/CannonHardpoint.qml b/examples/declarative/plasmapatrol/content/CannonHardpoint.qml index b2c7aca1fd..dc15f0cae1 100644 --- a/examples/declarative/plasmapatrol/content/CannonHardpoint.qml +++ b/examples/declarative/plasmapatrol/content/CannonHardpoint.qml @@ -51,7 +51,7 @@ Item { height: 24 Emitter{ id: visualization - particle: "cannon" + group: "cannon" enabled: container.show system: container.system anchors.centerIn: parent @@ -80,7 +80,7 @@ Item { } Emitter{ id: emitter - particle: "cannon" + group: "cannon" enabled: false system: container.system anchors.centerIn: parent diff --git a/examples/declarative/plasmapatrol/content/Cruiser.qml b/examples/declarative/plasmapatrol/content/Cruiser.qml index b0d20023db..a4983fc2a0 100644 --- a/examples/declarative/plasmapatrol/content/Cruiser.qml +++ b/examples/declarative/plasmapatrol/content/Cruiser.qml @@ -58,7 +58,7 @@ Item { //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 - particle: container.shipParticle + group: container.shipParticle anchors.centerIn: parent width: 64 height: 64 @@ -76,7 +76,7 @@ Item { } Emitter{ system: container.system - particle: "cruiserArmor" + group: "cruiserArmor" anchors.fill: parent shape: EllipseShape{ fill: false } enabled: hp>0 @@ -92,7 +92,7 @@ Item { system: container.system enabled: container.hp <=0 anchors.fill: parent - particles: ["cruiserArmor"] + groups: ["cruiserArmor"] goalState: "death" // jump: true once: true diff --git a/examples/declarative/plasmapatrol/content/Frigate.qml b/examples/declarative/plasmapatrol/content/Frigate.qml index 8d493b81d5..f26e7e881c 100644 --- a/examples/declarative/plasmapatrol/content/Frigate.qml +++ b/examples/declarative/plasmapatrol/content/Frigate.qml @@ -56,7 +56,7 @@ Item { height: 128 Emitter{ system: container.system - particle: "frigateShield" + group: "frigateShield" anchors.centerIn: parent size: 92 emitRate: 1 @@ -65,7 +65,7 @@ Item { } Emitter{ system: container.system - particle: container.shipParticle + group: container.shipParticle anchors.centerIn: parent width: 64 height: 16 diff --git a/examples/declarative/plasmapatrol/content/LaserHardpoint.qml b/examples/declarative/plasmapatrol/content/LaserHardpoint.qml index 45712bf68a..56fd91b5b3 100644 --- a/examples/declarative/plasmapatrol/content/LaserHardpoint.qml +++ b/examples/declarative/plasmapatrol/content/LaserHardpoint.qml @@ -51,7 +51,7 @@ Item { height: 24 Emitter{ id: visualization - particle: "laser" + group: "laser" system: container.system anchors.fill: parent enabled: container.show @@ -86,7 +86,7 @@ Item { } Emitter{ id: emitter - particle: "laser" + group: "laser" enabled: false system: container.system x: Math.min(container.width/2, target.x); diff --git a/examples/declarative/plasmapatrol/content/PlasmaPatrolParticles.qml b/examples/declarative/plasmapatrol/content/PlasmaPatrolParticles.qml index 792ba7ab72..7a8c3e61b3 100644 --- a/examples/declarative/plasmapatrol/content/PlasmaPatrolParticles.qml +++ b/examples/declarative/plasmapatrol/content/PlasmaPatrolParticles.qml @@ -45,7 +45,7 @@ Item{ property ParticleSystem sys ImageParticle{ system: sys - particles: ["default"] + groups: ["default"] source: "pics/blur-circle3.png" color: "#003A3A3A" colorVariation: 0.1 @@ -53,7 +53,7 @@ Item{ } ImageParticle{ system: sys - particles: ["redTeam"] + groups: ["redTeam"] source: "pics/blur-circle3.png" color: "#0028060A" colorVariation: 0.1 @@ -61,7 +61,7 @@ Item{ } ImageParticle{ system: sys - particles: ["greenTeam"] + groups: ["greenTeam"] source: "pics/blur-circle3.png" color: "#0006280A" colorVariation: 0.1 @@ -69,7 +69,7 @@ Item{ } ImageParticle{ system: sys - particles: ["blaster"] + groups: ["blaster"] source: "pics/star2.png" //color: "#0F282406" color: "#0F484416" @@ -78,7 +78,7 @@ Item{ } ImageParticle{ system: sys - particles: ["laser"] + groups: ["laser"] source: "pics/star3.png" //color: "#00123F68" color: "#00428FF8" @@ -87,7 +87,7 @@ Item{ } ImageParticle{ system: sys - particles: ["cannon"] + groups: ["cannon"] source: "pics/particle.png" color: "#80FFAAFF" colorVariation: 0.1 @@ -95,7 +95,7 @@ Item{ } ImageParticle{ system: sys - particles: ["cannonCore"] + groups: ["cannonCore"] source: "pics/particle.png" color: "#00666666" colorVariation: 0.8 @@ -103,7 +103,7 @@ Item{ } ImageParticle{ system: sys - particles: ["cannonWake"] + groups: ["cannonWake"] source: "pics/star.png" color: "#00CCCCCC" colorVariation: 0.2 @@ -111,7 +111,7 @@ Item{ } ImageParticle{ system: sys - particles: ["frigateShield"] + groups: ["frigateShield"] source: "pics/blur-circle2.png" color: "#00000000" colorVariation: 0.05 @@ -121,7 +121,7 @@ Item{ } ImageParticle{ system: sys - particles: ["cruiserArmor"] + groups: ["cruiserArmor"] z: 1 sprites:[Sprite{ id: spinState @@ -146,7 +146,7 @@ Item{ } TrailEmitter{ system: sys - particle: "cannonWake" + group: "cannonWake" follow: "cannon" emitRatePerParticle: 64 lifeSpan: 600 @@ -160,7 +160,7 @@ Item{ } TrailEmitter{ system: sys - particle: "cannonCore" + group: "cannonCore" follow: "cannon" emitRatePerParticle: 256 lifeSpan: 128 diff --git a/examples/declarative/plasmapatrol/content/Sloop.qml b/examples/declarative/plasmapatrol/content/Sloop.qml index 82e57f5161..59678a75ea 100644 --- a/examples/declarative/plasmapatrol/content/Sloop.qml +++ b/examples/declarative/plasmapatrol/content/Sloop.qml @@ -60,7 +60,7 @@ Item { //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 - particle: container.shipParticle + group: container.shipParticle shape: EllipseShape{} emitRate: hp > 0 ? hp + 20 : 0 diff --git a/examples/declarative/plasmapatrol/plasmapatrol.qml b/examples/declarative/plasmapatrol/plasmapatrol.qml index 4ea464b9f8..2fa9f44929 100644 --- a/examples/declarative/plasmapatrol/plasmapatrol.qml +++ b/examples/declarative/plasmapatrol/plasmapatrol.qml @@ -97,7 +97,7 @@ Rectangle { anchors.fill: parent system: particles enabled: true - particle: "default" + group: "default" emitRate: 1200 lifeSpan: 1200 shape: MaskShape{source:"content/pics/TitleText.png"} |