Can’t seem to make GKGridGraph or GKGridGraphNode work because the position needs to be supplied as a vector_int2 and they’re getting garbled somehow.
In app simplest-mac, generated by motion create simplest-mac —template=osx and adding app.frameworks << "GameplayKit” to the Rakefile, I stick the following chunk in AppDelegate after buildWindow:
The vector_int2s seem to be created and set nicely. And in fact, the method calls seem to take a Pointer value or [x,y] equally happily. But the graph or graphnode instance created seems to be garbled.
The same code chunk added to a simplest-ios RubyMotion app gives the same results.
FWIW, my guess at an equivalent chunk of Swift added to AppDelegate of a simplest xcode app for Mac:
Can’t seem to make
GKGridGraph
orGKGridGraphNode
work because the position needs to be supplied as avector_int2
and they’re getting garbled somehow.In app
simplest-mac
, generated bymotion create simplest-mac —template=osx
and addingapp.frameworks << "GameplayKit”
to the Rakefile, I stick the following chunk inAppDelegate
afterbuildWindow
:then
rake
gets:The
vector_int2
s seem to be created and set nicely. And in fact, the method calls seem to take aPointer
value or[x,y]
equally happily. But the graph or graphnode instance created seems to be garbled.The same code chunk added to a
simplest-ios
RubyMotion app gives the same results.FWIW, my guess at an equivalent chunk of Swift added to
AppDelegate
of a simplest xcode app for Mac:gets:
which is more what I was expecting.