Jump to content

Uncaught ReferenceError: render is not defined


Martiny
 Share

Recommended Posts

I keep getting this error in my console. Here's what I did with my code: 

var game = new Phaser.Game(1200, 500, Phaser.CANVAS, 'game', { preload: preload, create: create, update: update, render: render});

I don't know what I'm doing wrong. 

 

What I want to do with render is to see the body of my sprite using this code from the starstruck example: 

function render () {game.debug.renderSpriteBody(player);}

But I just don't know how to do it! 

 

Thanks in advance!

Link to comment
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...
 Share

  • Recently Browsing   0 members

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