updates to elevate my code to scratch standards
This commit is contained in:
parent
365e93f16a
commit
6e6524e481
14 changed files with 68 additions and 122 deletions
|
@ -273,15 +273,13 @@ Sprite.prototype.onClick = function(evt) {
|
|||
};
|
||||
|
||||
Sprite.prototype.setVisible = function(v) {
|
||||
if (v === true || v === false) {
|
||||
this.visible = v;
|
||||
this.updateVisible();
|
||||
}
|
||||
this.visible = v;
|
||||
this.updateVisible();
|
||||
};
|
||||
|
||||
Sprite.prototype.updateLayer = function() {
|
||||
$(this.mesh).css('z-index', this.z);
|
||||
if (this.talkBubble) $(this.talkBubble).css('z-index', this.z);
|
||||
if (this.talkBubble) this.talkBubble.css('z-index', this.z);
|
||||
if (this.askInput) this.askInput.css('z-index', this.z);
|
||||
};
|
||||
|
||||
|
|
Reference in a new issue