greencoder

Members
  • Content Count

    54
  • Joined

  • Last visited

  • Days Won

    2

greencoder last won the day on November 26 2019

greencoder had the most liked content!

About greencoder

  • Rank
    Advanced Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Heya everyone, I am silently working on a project with Panda2 but at times I feel like I better ask an experienced developer on the platform but then since the turn around time can be a bit long, I tend to dig deeper and find my own solutions. Finding my own solutions has a con, takes more time than needed. So I thought to ask whether anyone would be interested in joining a discord channel for Panda2 dev. Please let me know your thoughts.
  2. Yikes, I feel embarrassed for assuming things here, I assumed : Container takes its position based on the its children Children in Container has their position in world coordinates Both of them were wrong, of course, I don’t know why I assumed so. So I corrected both of it and then its working as intended : game.createScene('Main', { init: function() { var cont = new game.Container(); cont.interactive = true; cont.position.set(0,200); cont.hitArea = new game.Rectangle(100, 100); cont.interactive = true; cont.click = function() { cont.removeAll(); cont.remove(); }; cont.addTo(this.stage); var box = new game.Graphics(); box.fillColor = '#ff0000'; box.drawRect(0, 0, 100, 100); box.addTo(cont); } }); Correcting my stupidity now and closing this thread.
  3. Don't worry about this, got it working.
  4. Hey @Ninjadoodle, I am looking at solving the same problem, could you please share a code snippet on how you solved this? I tried masking a container but it doesn't seem to be working for me. Maybe I am missing some parenting.
  5. Thanks for the code snippet, I shall try that. I have been working on a system of my own, let me see whether I can reach to it. In the mean time, how do you deal with the mask? I am quite stuck in how to organize the layers to show the rows only in the table.
  6. Sorry, actually that doesn't work, if I use hitarea, it would be always taken from 0,0 . Belated holiday wishes @Stephan @Wolfsbane
  7. Ok have been experimenting a lot with this, and when combined with a container, the click again is triggered outside of the container area : game.createScene('Main', { init: function() { var box = new game.Graphics(); box.fillColor = '#ff0000'; box.drawRect(0, 0, 100, 100); box.position.set(0,200); var cont = new game.Container(); box.addTo(cont); cont.interactive = true; cont.click = function() { cont.removeAll(); cont.remove(); }; cont.addTo(this.stage); } }); @Stephan @Wolfsbane, any advice?
  8. Hey guys, So this is the next challenge up for me, how to approach creating a scrollable table with selectable rows in Panda? Any pointers would help. @enpu, @Stephan, @Wolfsbane, any expert advice? GC
  9. Sorry for the quick turn around and finding a solution for this issue, modified the code following code : Old Code : box.drawRect(0, 200, 100, 100); Modified Code : box.drawRect(0, 0, 100, 100); box.position.set(0,200); So we have to always use position.set if you need to position it correctly and not with drawrect, if it's interactive, definitely sounds like a bug.
  10. Hey guys, Hope someone has an explaination and solution for this, was in the middle of a project and had to create a gym level to test the problem and found it, here's the same code : game.createScene('Main', { init: function() { var box = new game.Graphics(); box.fillColor = '#ff0000'; box.drawRect(0, 200, 100, 100); box.interactive = true; box.click = function() { box.remove(); }; box.addTo(this.stage); } }); If you click above the box, the box gets destroyed
  11. greencoder

    Essentials plugin

    Can the buttons created with essentials be manually scaled with x and y?
  12. An update about this thread, to sum it up, thanks @enpu, it works. For some reason, my PC's Panda IDE was an old version and it might have caused the issue. So here are the steps : Download latest panda IDE Update the engine to the latest in your project Download PlayFabClientApi.js from https://download.playfab.com/PlayFabClientApi.js into the media folder Add game.addAsset('PlayFabClientApi.js') to your game.main Add the following snippet to test whether it works (I used it in init of game.main), ideally when you run this in the IDE or the browser, a player will be created on PlayFab : var loginRequest = { TitleId: '<your game ID>', CustomId: <custom ID>, CreateAccount: true }; PlayFabClientSDK.LoginWithCustomID(loginRequest, function(result, error) { if (!error) { console.log('PF ID: ' + result.data.PlayFabId); } else { console.log(error);} }); As a next step, I prefer to make PlayFabClientApi.js into a plugin, like the instantgames plugin and load the script dynamically and not bundle it with the package. I shall keep this thread updated if the plugin is a success, or maybe drop if off in the plugins sub forum. Once again, thanks @enpu! @Stephan, there you go, done! Time to start with the game, yay!
  13. @Stephan hehe! @Wolfsbane, ... UPDATE : Preloader is working as intended, no issues as I thought.
  14. Thanks for the pointers @Stephan. Tried a couple of prototypes, I believe the preloader is broken, on the platform, the game stays at 0% and then goes straight into the game without any progress update. Otherwise, yes its functioning as needed. Next step, playfab!