mirror of
https://github.com/photonstorm/phaser
synced 2024-11-24 21:53:59 +00:00
Added in setFrame method to all texture based Game Objects.
This commit is contained in:
parent
3a8c50fbe3
commit
8e19673f08
1 changed files with 5 additions and 0 deletions
|
@ -12,6 +12,11 @@ var Texture = {
|
|||
{
|
||||
this.texture = this.scene.sys.textures.get(key);
|
||||
|
||||
return this.setFrame(frame);
|
||||
},
|
||||
|
||||
setFrame: function (frame)
|
||||
{
|
||||
this.frame = this.texture.get(frame);
|
||||
|
||||
if (!this.frame.cutWidth || !this.frame.cutHeight)
|
||||
|
|
Loading…
Reference in a new issue