ios - Attaching arbitrary information to an SKSpriteNode -
ios - Attaching arbitrary information to an SKSpriteNode -
i'm making game sprite kit in generate many instances of skspritenode
. when observe collision between 2 sprites, can lot of info colliding sprites (position, rotation, scale, etc.).
my question: there way embed arbitrary information, string or integer, sprite? wanted timestamp each sprite time generated, , display when collides something.
uibutton
come mind, can define button.tag
, , utilize info later.
sknode has userdata
dictionary can store data.
ios swift sprite-kit
Comments
Post a Comment