Skip to content

Commit 8e19673

Browse files
committed
Added in setFrame method to all texture based Game Objects.
1 parent 3a8c50f commit 8e19673

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

v3/src/gameobjects/components/Texture.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ var Texture = {
1212
{
1313
this.texture = this.scene.sys.textures.get(key);
1414

15+
return this.setFrame(frame);
16+
},
17+
18+
setFrame: function (frame)
19+
{
1520
this.frame = this.texture.get(frame);
1621

1722
if (!this.frame.cutWidth || !this.frame.cutHeight)

0 commit comments

Comments
 (0)