Ninjadoodle Posted June 15, 2018 Share Posted June 15, 2018 Hi @enpu I love the 'Essetials' Flash class - it's a really nice shortcut. I'm just wondering if there is a way to set the area of the flash? This might be a bit elaborate for the plugin, but here is a case scenario ... I have a square with an image and a dark border. I would like to flash the image without flashing the border as well. I know I can do this by inserting the border as a child, but that causes other problems in my game. Having an option of setting the Flash Area inside the sprite being flashed would be awesome. No problem if this is a little too complex, just wanted to ask Quote Link to comment Share on other sites More sharing options...
enpu Posted June 15, 2018 Share Posted June 15, 2018 @Ninjadoodle I just added four new parameters to the flash function, which allows you to cut it from left, top, right and bottom: // Cut flash 100px from left and 50px from right sprite.flash(400, '#ff0000', null, 100, 0, 50, 0); I have attached new version of the plugin here, could you test how it works before i publish it? panda2-plugin-essentials-1_2_2.zip Ninjadoodle 1 Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted June 15, 2018 Author Share Posted June 15, 2018 Absolute legend @enpu!! Works flawlessly Thanks heaps for this! PS. What is the 'null' for? Quote Link to comment Share on other sites More sharing options...
enpu Posted June 15, 2018 Share Posted June 15, 2018 https://www.panda2.io/plugins/essentials/docs/Sprite Callback function Check out the example project to see it in use. Ninjadoodle 1 Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted June 15, 2018 Author Share Posted June 15, 2018 @enpu Oh, nice! Now I see - I just went straight to testing the 'cut flash' with my game and didn't even look at the example. Now, I know what the settings is for lol Thanks again!! Quote Link to comment Share on other sites More sharing options...
8bitdna Posted June 15, 2018 Share Posted June 15, 2018 Can I just say how impressive your support is @enpu I mean it, fantastic to see. Love the fact the engine is open source as well, the two coupled together give massive confidence IMO. Sorry @Ninjadoodle, thread hijacking Ninjadoodle 1 Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted June 15, 2018 Author Share Posted June 15, 2018 @8bitdna - I completely agree, @enpu is a legend and Panda 2 absolutely rocks! 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.