Jump to content

issues adding sprite


jasper1990
 Share

Recommended Posts

I keep getting the error : 'add' of undefined for  this.physics.add.sprite(100, 450, 'dude'); but this.add.sprite works but then I cant use setVelocityY either. my configure is this

   var config = {
    type: Phaser.AUTO,
    width: 800,
    height: 600,
    backgroundColor:'#00cd00',
    physics: {
        default:'impact',
        impact: {
            x: 0,
            y: 0,
            width: 800,
            height: 1200,
            thickness: 32
        }
    },
    scene: {
        preload: preload,
        create: create,
        update: update
    }
    };

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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