Jump to content

Input Bugs in PandaJS


angelkom
 Share

Recommended Posts

I've found few bugs in the Input model in PandaJS:

 

game.scene.click = function() {} - doesn't work on scene only on sprites

 

sprite.mousedown = function() {} - this format doesn't work on sprites

 

new game.Sprite('player.png', 100, 100, {

interactive: true,

mousedown: function(){}

}); - this type works on sprites

 

game.scene.touchstart = function() {} - this doesn't work on scenes

 

game.scene.tap = function() {} - doesn't work on scenes

 

I hope enpu will fix them soon

Link to comment
Share on other sites

@anglekom

 

I'm using tap/click and also mousemove events on scene object and it works for me. I'm using version 1.4.0 of Panda engine.

 

Try to use this structure:

Scene =  game.Scene.extends({init : function(){    //your code},click: function(mouseData){   //your code},tap: function(touchData){   //your code},mousemove: function(mouseData){   //your code},mousedown: function(mouseData){   //your code},mouseup: function(mouseData){   //your 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...