Last active 2 weeks ago
There's a difference how you call the application: if you start it from the terminal it makes a difference if you call it via
PolycodeDir/Polycode or directly from within the Polycode folder with
Polycode as the working directory (the starting point for relative path names) is another one..
You can specify the working directory in .desktop files with the path property as described here: https://linuxcritic.wordpress.com/2010/04/07/anatomy-of-a-desktop-file/ please set it to the directory in which the binary is found.
Maybe you forgot to set the working directory to your polycode folder?
you created the Crab object before by calling
crab = Crab() ?
No other idea, as I'm not using Lua..
did you have a look at: http://polycode.org/learn/events#lua ?
you don't have to create an extra class for every handled event - just declare a function and register a callback for that:
okButton:addEventListener(nil, onOkButton, UIEvent.CLICK_EVENT)
that function should look like the onCollision here:
you can then cast the event parameter:
local uiEvent = safe_cast(event, UIEvent)
to get access to ui event specific information.
by using get
uiEvent:getDispatcher() you should be able to do the same differentiation as in C++
Hope I could help!
don't miss to declare
class "Crab" at the beginning of the file
hmm... not sure - maybe have a look here (bit too tired to answer directly..):
I don't really can help... But the corefileprovider should not implement addSource, thats right as it is - the BasicFileProvider or PhysFSFileProvider implement that function... If somewhere an object is falsly used as corefileprovider this of course could lead to corruption.. But I think this is not very likely..
Jep.. See changes of:
Maybe try using the newest...