Jump to content

this.game.add.tween(this.creditGroup).from


zuzzuz
 Share

Recommended Posts

Hello, I have a problem with this.game.add.tween(this.creditGroup).from.

i want to display credit of my app when i click on "credit" but when i use this function I receive this error:

"Uncaught TypeError: undefined is not a function" the error is on the .from event.

If I change the event .from in .to this works, but i see the effect that remove the panel, and i want display the panel.

Can someone help me?

        credit: function(){

        

        

        this.creditGroup = this.game.add.group();

        this.creditPanel = this.game.add.sprite(490, 50, 'creditPanel');

        this.creditTitle = this.game.add.text(610, 90, 'Titolo', this.creditTitleText);

        this.creditText = this.game.add.text(540, 150, 'Code by Myself' + '\n\n \t\t\t Art by Myself', this.creditTextStyle);

        this.creditGroup.add(this.creditPanel);

        this.creditGroup.add(this.creditTitle);

        this.creditGroup.add(this.creditText);

          

        // Tween in from top of screen

      this.game.add.tween(this.creditGroup).from({x: 1400}, 1000, Phaser.Easing.Bounce.Out, true);

            

    },

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...