1{ 2 "MaxCount": 6000, 3 "Drawable": { 4 "Type": "SkCircleDrawable", 5 "Radius": 2 6 }, 7 "Code": [ 8 "void effectSpawn(inout Effect effect) {", 9 " effect.rate = 2000;", 10 "}", 11 "", 12 "void effectUpdate(inout Effect effect) {", 13 "}", 14 "", 15 "void spawn(inout Particle p) {", 16 " p.pos.y += sin(effect.age * 6.28) * 40;", 17 " p.lifetime = 2 + (rand(p.seed) * 2);", 18 " p.vel.x = (30 * rand(p.seed)) + 50;", 19 " p.vel.y = (20 * rand(p.seed)) - 10;", 20 "}", 21 "", 22 "void update(inout Particle p) {", 23 " p.color.r = p.age;", 24 " p.color.g = 1 - p.age;", 25 " float s1 = 0.5 + (1.5 * p.age);", 26 " float s2 = 1.0 + (-0.75 * p.age);", 27 " p.scale = s1 + (s2 - s1) * rand(p.seed);", 28 " p.vel.y += 20.0 * dt;", 29 "}", 30 "" 31 ], 32 "Bindings": [] 33}