Browse Source

Make gem tilting effect less intense

feature/coffeescript
Sven Slootweg 8 years ago
parent
commit
3a8ed9bd36
  1. 4
      gemswap/core.coffee
  2. 4
      gemswap/gemswap.js

4
gemswap/core.coffee

@ -58,7 +58,7 @@ $(->
diamond.draw_sprite = false
diamond.onCreate = ->
@fade_value = 0
@fade_value = 0.3
@shimmer_value = @engine.ease.circInOut(0, 0.8, engine.random.number(200, 350), null, true, true)
@gem_type = @engine.random.pick("diamond", "yellow", "blue")
@ -77,7 +77,7 @@ $(->
})
diamond.onMouseOver = ->
@fade_value = @engine.ease.quadInOut(0, 1, 10, @engine.ease.bounceOut(1, 0, 35))
@fade_value = @engine.ease.quadInOut(0.3, 0.7, 10, @engine.ease.bounceOut(0.7, 0.3, 65))
cursor = @engine.getObject("cursor").getInstances()[0]
cursor.x = @engine.ease.quadInOut(cursor.x, @x - 9, 8)

4
gemswap/gemswap.js

@ -39,7 +39,7 @@
diamond.sprite = engine.getSprite("diamond");
diamond.draw_sprite = false;
diamond.onCreate = function() {
this.fade_value = 0;
this.fade_value = 0.3;
this.shimmer_value = this.engine.ease.circInOut(0, 0.8, engine.random.number(200, 350), null, true, true);
return this.gem_type = this.engine.random.pick("diamond", "yellow", "blue");
};
@ -56,7 +56,7 @@
});
};
diamond.onMouseOver = function() {
this.fade_value = this.engine.ease.quadInOut(0, 1, 10, this.engine.ease.bounceOut(1, 0, 35));
this.fade_value = this.engine.ease.quadInOut(0.3, 0.7, 10, this.engine.ease.bounceOut(0.7, 0.3, 65));
cursor = this.engine.getObject("cursor").getInstances()[0];
cursor.x = this.engine.ease.quadInOut(cursor.x, this.x - 9, 8);
return cursor.y = this.engine.ease.quadInOut(cursor.y, this.y - 9, 8);

Loading…
Cancel
Save