cant seem to get sprite to load

Recommended Posts

Any help??

  var game = new Phaser.Game(800, 600, Phaser.AUTO);
            var GameActionState  = {
               preload: function(){
                  game.load.image('field', 'assets/field.png');
                  game.load.image('wr1', 'assets/reddot.png');
                  game.load.image('wr2', 'assets/reddot.png');
                  game.load.image('wr3', 'assets/reddot.png');
                  game.load.image('wr4', 'assets/reddot.png');
                  game.load.image('qb', 'assets/reddot.png');
                  game.load.image('button', 'assets/button.jpg');
                  game.load.spritesheet('player', 'assets/player2.png',61, 70, 16);

                create: function(wr1){

                game.physics.arcade.enable(wr1, wr2, wr3, wr4, football);

                var player= game.add.sprite(300, 300,'player');


Share this post

Link to post
Share on other sites

are you getting any specific errors in console ? I can't see how you're actually using the  GameActionState ?

The above code isn't enough for investigating your issue , can you either post more code or make a simple jsfiddle example so we can see all the code? 

Share this post

Link to post
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.

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.


  • Recently Browsing   0 members

    No registered users viewing this page.