Jump to content

Problem with json animation


ivanpaz
 Share

Recommended Posts

Hello folks

I was programming a game using Phaser but a big problem showed up.

I using Brackets and Wamp Server.

 

When I test my game in Brackets (it simulate a WebView), the game works normally, but when I try by Wamp a error appear.

 

My animation just don't work and just a strange error appears in Chrome console:

Uncaught TypeError: Cannot read property 'uuid' of undefined

 

This is my create function:

sg = game.add.sprite(55, 0, 'supergeek');

 

 

    //Animação de morte para a esquerda

    sg.animations.add('DeadLeft',[

        "DeadLeft/27",

        "DeadLeft/28",

        "DeadLeft/29",

        "DeadLeft/30"

    ],5,true);

 

    animDieLeft =  sg.animations.add('DieLeft',[

        "DieLeft/25",

        "DieLeft/26"

    ],5,false);

 

    animDieLeft.onComplete.add(fimMorteLeft, this);

 

 

 

    //Animação de morte para a Direita

    sg.animations.add('DeadRight',[

        "DeadRight/21",

        "DeadRight/22",

        "DeadRight/23",

        "DeadRight/24"

    ],5,true);

 

    animDieRight =  sg.animations.add('DieRight',[

        "DieRight/20",

        "DieRight/21"

    ],5,false);

 

    animDieRight.onComplete.add(fimMorteRight, this);

 

 

    //Animação vira para baixo

    sg.animations.add('TurnDown',["TurnDown/32"],5,true);

 

    //Animação vira para a esquerda

    sg.animations.add('TurnLeft',["TurnLeft/31"],5,true);

 

    //Animação vira para a direita

    sg.animations.add('TurnRight',["TurnRight/33"],5,true);

 

    //Animação vira para cima

    sg.animations.add('TurnUp',["TurnUp/34"],5,true);

 

    //Animação parado Direito

    sg.animations.add('IdleRight',["IdleRigth/02"],5,true);

 

    //Animação parado Esquerda

    sg.animations.add('IdleLeft',["IdleLeft/00"],5,true);

 

    //Animação parado Baixo

    sg.animations.add('IdleDown',["IdleDown/01"],5,true);

 

    //Animação parado Cima

    sg.animations.add('IdleUp',["IdleUp/03"],5,true);

 

    //Animação de mandar para baixo

    sg.animations.add('WalkDown',[

        "WalkDown/08",

        "WalkDown/09",

        "WalkDown/10",

        "WalkDown/11"

    ],5,true);

 

 

    //Animação de mandar para a esquerda

    sg.animations.add('WalkLeft',[

        "WalkLeft/04",

        "WalkLeft/05",

        "WalkLeft/06",

        "WalkLeft/07"

    ],5,true);

 

    //Animação de mandar para a direita

    sg.animations.add('WalkRight',[

        "WalkRight/12",

        "WalkRight/13",

        "WalkRight/14",

        "WalkRight/15"

    ],5,true);

 

    //Animação de mandar para cima

    sg.animations.add('WalkUp',[

        "WalkUp/16",

        "WalkUp/17",

        "WalkUp/18",

        "WalkUp/18"

    ],5,true);

 

 

 

    console.log(sg);

 

I can't see the problem..

 

 

Thanks!!!

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