-
-
Save photonstorm/50d6a94aba9704441c7a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<pre class="ipsCode prettyprint">betterUpdateBounds: function() { this.width = this.sprite.width; this.height = this.sprite.height; this.halfWidth = Math.floor(this.width / 2); this.halfHeight = Math.floor(this.height / 2); this.center.setTo(this.x + this.halfWidth, this.y + this.halfHeight); //this.offset.x = (this.sprite.anchor.x * this.width); //this.offset.y = (this.sprite.anchor.y * this.height);}</pre> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment