Jump to content

Image not displaying


kray
 Share

Recommended Posts

I have two images that I want to display, but there's some error. I'm just getting green boxes in place of the images. I checked the paths. They are correct. What might be the issue?

I have attached a screenshot.

 

You can view the screenshot of the console here : https://www.dropbox.com/s/1puzi0mci2m1535/Capture.PNG?dl=0

My JS code:

 

var GameState = {    preload: function() {        this.add.image('bg','Assets/Images/stormy-sky.png');        this.add.image('sea','Assets/Images/sea.png');        this.add.image('ship','Assets/Images/Ship.png');    },    create: function() {        this.background = this.game.add.sprite(0,0,'bg');        this.sea = this.game.add.sprite(0,300,'sea');    },    update: function() {    }};var game = new Phaser.Game(640,360,Phaser.AUTO);game.state.add('GameState',GameState);game.state.start('GameState');

post-13815-0-86759100-1427349736.png

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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