Jump to content

cant seem to get sprite to load


dthrasher90
 Share

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('football','assets/football.png');
                  game.load.image('button', 'assets/button.jpg');
                  game.load.spritesheet('player', 'assets/player2.png',61, 70, 16);
                },

                create: function(wr1){

                game.physics.startSystem(Phaser.Physics.ARCADE);
                game.physics.arcade.enable(wr1, wr2, wr3, wr4, football);


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

 

Link to comment
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? 

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

Guest
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.

Loading...
 Share

  • Recently Browsing   0 members

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