Jump to content

Question regarding sprites


Peachiie
 Share

Recommended Posts

Hello everyone! I have a sprite sheet and the json folder and I'm trying to add it to my preload for a Phaser 3 game. I was doing a tutorial which I think is using maybe an older version of Phaser but it tells me to use this.load.atlasJSONHash but when I run that I get an error:

 

this.load.atlasJSONHash is not a function

 

My code so far is...

import explorerJSON from '../assets/explorer.json';
import explorer from '../assets/explorer.png';
 
class Game extends Phaser.Scene {
constructor() {
super({ key: 'Game' });
}
 
preload() {
// load all the images
this.load.atlasJSONHash('explorer', explorer, explorerJSON);
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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