mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 06:52:40 -05:00
Minor cleanup around cloning methods
This commit is contained in:
parent
6038722a79
commit
bd76395676
2 changed files with 4 additions and 4 deletions
|
@ -582,7 +582,7 @@ RenderedTarget.prototype.goBackLayers = function (nLayers) {
|
|||
|
||||
/**
|
||||
* 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) {
|
||||
if (this.renderer) {
|
||||
|
@ -637,11 +637,11 @@ RenderedTarget.prototype.keepInFence = function (newX, newY, optFence) {
|
|||
/**
|
||||
* Make a clone, copying any run-time properties.
|
||||
* If we've hit the global clone limit, returns null.
|
||||
* @return {!RenderedTarget} New clone.
|
||||
* @return {RenderedTarget} New clone.
|
||||
*/
|
||||
RenderedTarget.prototype.makeClone = function () {
|
||||
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);
|
||||
var newClone = this.sprite.createClone();
|
||||
|
|
|
@ -46,7 +46,7 @@ var Sprite = function (blocks, runtime) {
|
|||
|
||||
/**
|
||||
* Create a clone of this sprite.
|
||||
* @returns {!Clone} Newly created clone.
|
||||
* @returns {!RenderedTarget} Newly created clone.
|
||||
*/
|
||||
Sprite.prototype.createClone = function () {
|
||||
var newClone = new RenderedTarget(this, this.runtime);
|
||||
|
|
Loading…
Reference in a new issue