Jump to content

Phaser ES6 communicate Between Normal Class to Scene Class


Recommended Posts

I want to communicate between normal class to Phaser scene class. How to do that ?

Normal Class:-

export default class checkConnection
{
i need to call the scene class ?
}

Scene class:-

import { Scene } from ‘phaser’;

class connectionLost extends Scene {
constructor() {
super({ key: connectionLost });
}

/**

create
*/
create()
{
//Show Popup Contains connection Lost Message.
}
}

export default connectionLost;

Lots of them tells can’t call normal class to scene class. please Go to trigger custom Window event. Any-other option there to call. Please share your Knowledge.

Edited by Balamurugan
Link to post
Share on other sites
  • 2 weeks later...

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.

×
×
  • Create New...