Stephan

(solved) bug report: problem with multiple TilingSprites

Recommended Posts

Hi @enpu,

 

I just encountered a bug in the TimingSprite class. It appears when you try to add multiple tiles to the game.:

 

game.module(
    'game.main'
)
.body(function() {

    game.addAsset('panda.png')
    game.addAsset('cloud1.png')

game.createScene('Main', {
    init: function() {
        this.sprite = new game.TilingSprite('panda.png', game.width, game.height).addTo(this.stage);

        //this semi-transparent tile replaces the texture of the first tile!
        this.sprite2 = new game.TilingSprite('cloud1.png', game.width, game.height).addTo(this.stage);

        //this however does work
        //this.sprite2 = new game.Sprite('cloud1.png').addTo(this.stage);
    },

});

});

 

I added an example project as attachment so you can reproduce the problem easily 😊

example.zip

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.