Minor cleanup around cloning methods

This commit is contained in:
Christopher Willis-Ford 2017-02-13 14:44:51 -08:00
parent 6038722a79
commit bd76395676
2 changed files with 4 additions and 4 deletions

View file

@ -582,7 +582,7 @@ RenderedTarget.prototype.goBackLayers = function (nLayers) {
/** /**
* Move behind some other rendered target. * Move behind some other rendered target.
* @param {!Clone} other Other rendered target to move behind. * @param {!RenderedTarget} other Other rendered target to move behind.
*/ */
RenderedTarget.prototype.goBehindOther = function (other) { RenderedTarget.prototype.goBehindOther = function (other) {
if (this.renderer) { if (this.renderer) {
@ -637,11 +637,11 @@ RenderedTarget.prototype.keepInFence = function (newX, newY, optFence) {
/** /**
* Make a clone, copying any run-time properties. * Make a clone, copying any run-time properties.
* If we've hit the global clone limit, returns null. * If we've hit the global clone limit, returns null.
* @return {!RenderedTarget} New clone. * @return {RenderedTarget} New clone.
*/ */
RenderedTarget.prototype.makeClone = function () { RenderedTarget.prototype.makeClone = function () {
if (!this.runtime.clonesAvailable() || this.isStage) { if (!this.runtime.clonesAvailable() || this.isStage) {
return; // Hit max clone limit, or this is the stage. return null; // Hit max clone limit, or this is the stage.
} }
this.runtime.changeCloneCounter(1); this.runtime.changeCloneCounter(1);
var newClone = this.sprite.createClone(); var newClone = this.sprite.createClone();

View file

@ -46,7 +46,7 @@ var Sprite = function (blocks, runtime) {
/** /**
* Create a clone of this sprite. * Create a clone of this sprite.
* @returns {!Clone} Newly created clone. * @returns {!RenderedTarget} Newly created clone.
*/ */
Sprite.prototype.createClone = function () { Sprite.prototype.createClone = function () {
var newClone = new RenderedTarget(this, this.runtime); var newClone = new RenderedTarget(this, this.runtime);