Jump to content

The best practices for using es6 constructor?


Recommended Posts

  1. What can we do in our constructor and what we can’t?
  2. The difference between constructor and ‘create’ method?
  3. What we must put to the constructor and what to the ‘create’ method?
  4. How do you use the constructor in your code?

Now I am using constructor when I want to get a scene in the derived class and then I use this scene to create new objects and move all ‘this.’ initialization from ‘create’ method to constructor because 80% depends on the received scene. So the ‘create’ method becomes useless and empty. Maybe I do something wrong.

Link to comment
Share on other sites


  • Recently Browsing   0 members

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