Page 441 - 완) I MDP 프로젝트 작품 보고서(전체과 1학년)1.6
P. 441
enumerable: true,
configurable: true
});
Object.defineProperty(Cup.prototype, "Selected", {
get: function () {
return this.selected;
},
set: function (value) {
this.selected = value;
},
enumerable: true,
configurable: true
});
Cup.prototype.raiseIt = function (progress, self) {
if (progress < 25) {
self.kineticImage.move({
x: 0,
y: -(self.constants.CANVAS_WIDTH / 480)
});
self.game.layer.draw();
setTimeout(self.raiseIt, 5, progress + 1, self);
}
};
Cup.prototype.putIt = function (progress, self, callBack) {
if (progress < 25) {
self.kineticImage.move({
x: 0,
y: self.constants.CANVAS_WIDTH / 480
});
self.game.layer.draw();
setTimeout(self.putIt, 5, progress + 1, self, callBack);
} else {
callBack();
}
};
Cup.prototype.swapCups = function (speed, otherCup, onSwapDone) {
var _this = this;
if (!this.isSwapInProgress && !otherCup.IsSwapInProgress) {
this.isSwapInProgress = true;
otherCup.IsSwapInProgress = true;
- 434 -