datenspuren stupsable clouds
This commit is contained in:
parent
5a1d71a07e
commit
8a5ce0f7f0
|
@ -86,6 +86,14 @@ function Cloud() {
|
|||
this.y = Math.floor(Math.random() * screen.height);
|
||||
this.el = $('<img class="backgroundcloud" src="images/pixelcloud.png"/>');
|
||||
$('body').append(this.el);
|
||||
|
||||
var that = this;
|
||||
this.el.mousemove(function(ev) {
|
||||
if (ev.offsetX < 36)
|
||||
that.speedX += 10;
|
||||
else
|
||||
that.speedX -= 10;
|
||||
});
|
||||
}
|
||||
|
||||
Cloud.prototype.update = function() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user