Jump to content

Uncaught TypeError: Cannot read property 'uuid' of undefined


Harshit Juneja
 Share

Recommended Posts

// Constantly getting the above mentioned error. Here is my update function. Can I use the add method inside update function ? Is this why I am getting the error ?

 

 function update(){

              if(game.physics.arcade.collide(idie,frame)){   

                  hit++;

                  fno = Math.floor((Math.random() * 6));

                  storeFnoOnHit[hit-1]=fno;

                  idie.animations.add('touch_bounds',[fno],10,true,true);

                  idie.animations.play('touch_bounds',10,false);

                  

              }

              else{

                  if(hit=0){

                      noHitTillHit++;

                      fno = Math.floor((Math.random() * 6));

                      noTouchFrame[noHitTillHit-1]=fno;

                      var temp = noTouchFrame[0];

                      idie.animations.add('b4_touch_bounds',[temp],10,true,true);

                      idie.animations.play('b4_touch_bounds',10,false);

                  }

                  else{

                      var temp1 = storeFnoOnHit[hit-1];

                      idie.animations.add('no_touch_bounds',[temp1],10,true,true);

                      idie.animations.play('no_touch_bounds',10,false);

                  }

              }

            updateTimer();                                     

             }

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