Browse Subversion Repository
Diff of /trunk/src/js/jgame.js
Parent Directory
| Revision Log
| Patch
| 2631 |
})(); |
})(); |
| 2632 |
var Game = (function () { |
var Game = (function () { |
| 2633 |
function Game(width, height) { |
function Game(width, height) { |
| 2634 |
|
var args = []; |
| 2635 |
|
for (var _i = 0; _i < (arguments.length - 2); _i++) { |
| 2636 |
|
args[_i] = arguments[_i + 2]; |
| 2637 |
|
} |
| 2638 |
this._exit = false; |
this._exit = false; |
| 2639 |
this.width = width; |
this.width = width; |
| 2640 |
this.height = height; |
this.height = height; |
| 4329 |
this.setDrawOption("globalAlpha", 1); |
this.setDrawOption("globalAlpha", 1); |
| 4330 |
}); |
}); |
| 4331 |
}; |
}; |
| 4332 |
Timeline.prototype.resizeTo = function (size, time, easing) { |
Timeline.prototype.resizeTo = function (size, time, easing, easing2) { |
| 4333 |
if(typeof easing === "number") { |
if(typeof easing === "number") { |
| 4334 |
return this.tween({ |
return this.tween({ |
| 4335 |
width: arguments[0], |
width: size, |
| 4336 |
height: arguments[1], |
height: time, |
| 4337 |
time: arguments[2], |
time: easing, |
| 4338 |
easing: arguments[3] |
easing: easing2 |
| 4339 |
}); |
}); |
| 4340 |
} |
} |
| 4341 |
return this.tween({ |
return this.tween({ |
| 4345 |
easing: easing |
easing: easing |
| 4346 |
}); |
}); |
| 4347 |
}; |
}; |
| 4348 |
Timeline.prototype.resizeBy = function (size, time, easing) { |
Timeline.prototype.resizeBy = function (size, time, easing, easing2) { |
| 4349 |
if(typeof easing === "number") { |
if(typeof easing === "number") { |
| 4350 |
return this.tween({ |
return this.tween({ |
| 4351 |
width: function () { |
width: function () { |
| 4352 |
return this.width + arguments[0]; |
return this.width + size; |
| 4353 |
}, |
}, |
| 4354 |
height: function () { |
height: function () { |
| 4355 |
return this.height + arguments[1]; |
return this.height + time; |
| 4356 |
}, |
}, |
| 4357 |
time: arguments[2], |
time: easing, |
| 4358 |
easing: arguments[3] |
easing: easing2 |
| 4359 |
}); |
}); |
| 4360 |
} |
} |
| 4361 |
return this.tween({ |
return this.tween({ |
| 4369 |
easing: easing |
easing: easing |
| 4370 |
}); |
}); |
| 4371 |
}; |
}; |
| 4372 |
Timeline.prototype.scaleTo = function (scale, time, easing) { |
Timeline.prototype.scaleTo = function (scale, time, easing, easing2) { |
| 4373 |
if(typeof easing === "number") { |
if(typeof easing === "number") { |
| 4374 |
return this.tween({ |
return this.tween({ |
| 4375 |
scale: { |
scale: { |
| 4376 |
x: arguments[0], |
x: scale, |
| 4377 |
y: arguments[1] |
y: time |
| 4378 |
}, |
}, |
| 4379 |
time: arguments[2], |
time: easing, |
| 4380 |
easing: arguments[3] |
easing: easing2 |
| 4381 |
}); |
}); |
| 4382 |
} |
} |
| 4383 |
return this.tween({ |
return this.tween({ |
| 4389 |
easing: easing |
easing: easing |
| 4390 |
}); |
}); |
| 4391 |
}; |
}; |
| 4392 |
Timeline.prototype.scaleBy = function (scale, time, easing) { |
Timeline.prototype.scaleBy = function (scale, time, easing, easing2) { |
| 4393 |
if(typeof easing === "number") { |
if(typeof easing === "number") { |
| 4394 |
return this.tween({ |
return this.tween({ |
| 4395 |
scale: function () { |
scale: function () { |
| 4396 |
var _scale = this.getDrawOption("scale"); |
var _scale = this.getDrawOption("scale"); |
| 4397 |
return { |
return { |
| 4398 |
x: _scale.x * arguments[0], |
x: _scale.x * scale, |
| 4399 |
y: _scale.y * arguments[1] |
y: _scale.y * time |
| 4400 |
}; |
}; |
| 4401 |
}, |
}, |
| 4402 |
time: arguments[2], |
time: easing, |
| 4403 |
easing: arguments[3] |
easing: easing2 |
| 4404 |
}); |
}); |
| 4405 |
} |
} |
| 4406 |
return this.tween({ |
return this.tween({ |
|
|
Legend:
| Removed from v.70 |
|
| changed lines |
| |
Added in v.71 |
|
|
| |