===================================================================
--- original.js
+++ change.js
@@ -30,9 +30,9 @@
var circlesCollide = function (o1, o2) {
var dx = (o1.x - o2.x) * (o1.x - o2.x);
var dy = (o1.y - o2.y) * (o1.y - o2.y);
var radii = (o1.width + o2.width) / 2;
- radii *= radii;
+ radii *= radii * 1.02;
if (dx + dy < radii) {
return true;
} else {
return false;
@@ -45,8 +45,9 @@
var particleGraphics = self.createAsset('particle', 'Particle Graphics', 0.5, 0.5);
self.vx = (Math.random() - 0.5) * 30;
self.vy = (Math.random() - 0.5) * 30;
self.gravity = 0.2;
+ self.alpha = 0.75;
self.tick = function () {
self.x += self.vx;
self.y += self.vy;
self.vy += self.gravity;
@@ -122,9 +123,14 @@
var Shape = Container.expand(function () {
console.log('Shape created');
var self = Container.call(this);
var shapeGraphics;
- var underlayTypes = ['underlay1', 'underlay2', 'underlay3', 'underlay4', 'underlay5', 'underlay6', 'underlay7', 'underlay8', 'underlay9', 'underlay10'];
+ if (false) var underlayTypes = ['underlay1', 'underlay2', 'underlay3', 'underlay4', 'underlay5', 'underlay6', 'underlay7', 'underlay8', 'underlay9', 'underlay10'];
+ var underlayTypes = ['underlay4', 'underlay5', 'underlay6', 'underlay7', 'underlay8', 'underlay9', 'underlay10'];
+ if (currentLevel > 8) {
+ underlayTypes = ['underlay8', 'underlay9', 'underlay10'];
+ }
+ underlayTypes = [];
var shapeGraphicsUnderlay;
for (var i = 0; i < underlayTypes.length; i++) {
var underlayType = underlayTypes[i];
shapeGraphicsUnderlay = LK.getAsset(underlayType, 'Shape Underlay', 0.5, 0.5);
@@ -175,12 +181,14 @@
};
self.colorIndex = Math.floor(Math.random() * 32);
self.rotation = Math.random() * (Math.PI * 2);
self.updateColor();
- shapeGraphics.alpha = 0.7;
+ shapeGraphics.alpha = 0.8;
+ self.scale.x = 1 - currentLevel * 0.017;
+ self.scale.y = 1 - currentLevel * 0.017;
self.addChild(shapeGraphics);
var angle = Math.random() * Math.PI * 2;
- var speed = 7;
+ var speed = 7 + currentLevel * 0.5;
self.vx = Math.cos(angle) * speed;
self.vy = Math.sin(angle) * speed;
self.move = function () {
if (!self.isCollided) {
@@ -207,9 +215,13 @@
};
self.explode = function () {
self.isCollided = true;
LK.setTimeout(scaleUp2, 1);
- for (var i = 0; i < 25; i++) {
+ var times = 24;
+ if (currentLevel > 8) {
+ times = 10;
+ }
+ for (var i = 0; i < times; i++) {
var particle = self.parent.addChild(new Particle());
particle.x = self.x;
particle.y = self.y;
}
@@ -218,9 +230,9 @@
self.scalingDown = true;
};
self.update = function () {
if (self.scalingUp) {
- if (self.scale.x < 4) {
+ if (self.scale.x < 4 - currentLevel * 0.2) {
self.scale.x += 0.2;
self.scale.y += 0.2;
} else {
self.scalingUp = false;
a white geometric square shape Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a white flat circle shape Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a white dot Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
flat white round disk Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
gif circle spinning animation Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A cozy living room with a christmas tree, presents, snacks, ornaments and everythning in place for christmas. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a shining star. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A super shiny white metallic christmas glass ball decoration with a glowing outline. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.