Jump to content

Uncaught ReferenceError: render is not defined


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


  • Recently Browsing   0 members

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