angelkom Posted May 18, 2014 Share Posted May 18, 2014 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 Quote Link to comment Share on other sites More sharing options...
maho125 Posted May 18, 2014 Share Posted May 18, 2014 @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}}); Quote Link to comment Share on other sites More sharing options...
angelkom Posted May 18, 2014 Author Share Posted May 18, 2014 Ok I will try but why the other way doesn't work and also it seems that the storage doesn't work too when I use game.storage.set(key, value); it says undefined is not a function Quote Link to comment Share on other sites More sharing options...
enpu Posted May 19, 2014 Share Posted May 19, 2014 Do you have storage id set in your config file or in code? config.jsstorage: { id: 'myStorageId'}or in game code (before game.start):game.Storage.id = 'myStorageId'; Quote Link to comment Share on other sites More sharing options...
angelkom Posted May 19, 2014 Author Share Posted May 19, 2014 Yes I remembered that I need to insert the id, thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.