Instantiating an Engine class causes error

10 views
Skip to first unread message

Sylvestr Lozynskyy

unread,
Jun 25, 2017, 3:44:43 PM6/25/17
to excaliburjs
Here is the image with the error and my source code:
I am importing excalibur.js before my script.

Erik Onarheim

unread,
Jun 25, 2017, 7:55:56 PM6/25/17
to Sylvestr Lozynskyy, excaliburjs
Hi Sylvestr,

I think you are missing a "new", the ex.Engine constructor is not available as a static method.

You need to call "new ex.Engine({width: 800, height: 600});"

Cheers,
Erik

--
You received this message because you are subscribed to the Google Groups "excaliburjs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to excaliburjs...@googlegroups.com.
To post to this group, send email to excal...@googlegroups.com.
Visit this group at https://groups.google.com/group/excaliburjs.
To view this discussion on the web visit https://groups.google.com/d/msgid/excaliburjs/ab07f480-b959-4afc-b378-ba60f185fc56%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sylvestr Lozynskyy

unread,
Jun 26, 2017, 3:02:45 AM6/26/17
to excaliburjs, pan.t...@gmail.com
Wow, how did I miss that for 10 minutes
Reply all
Reply to author
Forward
0 new messages