locked
SKAction.runBlock not showing up ! RRS feed

  • Question

  • User282777 posted

    Hi Everyone ,

    Why SKAction.runBlock method not showing up in my SKScene class ? i missed anything :( ,i want to run action for SKEmitterNode to remove emitter after some time.Could anyone tell me right approach to do this please.

    Thanks in advance

    Monday, February 6, 2017 2:07 PM

Answers

  • User35201 posted

    I accidentally deleted Tim's answer (It was showing up as doubled for some reason)

    Hi Mounika,

    The runBlock: obj-c method from SKAction is bound simply as Run in Xamarin.Mac, so:

    ``` SKAction.Run (() => { });

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Wednesday, February 8, 2017 2:46 PM

All replies

  • User282777 posted

    @TimothyRisi

    Thanks :)

    Wednesday, February 8, 2017 5:13 AM
  • User35201 posted

    I accidentally deleted Tim's answer (It was showing up as doubled for some reason)

    Hi Mounika,

    The runBlock: obj-c method from SKAction is bound simply as Run in Xamarin.Mac, so:

    ``` SKAction.Run (() => { });

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Wednesday, February 8, 2017 2:46 PM
  • User13121 posted

    @ChrisHamons said: I accidentally deleted Tim's answer (It was showing up as doubled for some reason)

    When a post is accepted as having answered the question, you get green highlighted post right after the OP with the answer, then still have the normal post wherever it was in the thread. Since the 'answer' post was the first one after the question in this case, they just show up back to back.

    Wednesday, February 8, 2017 5:17 PM
  • User35201 posted

    Yeah, I figured that out after the fact. I don't remember the forum doing that before, but it could be lack of coffee.

    In any case, my bad.

    Wednesday, February 8, 2017 5:19 PM
  • User12211 posted

    @ChrisHamons - That's a recent change that is actually kind of annoying, especially since the marked answer might not be directly answering the first post, but rather added information from follow-up questions.

    I would rather have them put it back the way it was and avoid the confusion.

    Wednesday, February 8, 2017 5:33 PM
  • User282777 posted

    @ChrisHamons

    Why my TouchesBeganWithEvent method not getting called in SKScene :(

    Thursday, February 9, 2017 7:11 AM
  • User35201 posted

    There are a number of stack overflow posts you can find if you search for "skscene touchesbegan" such as:

    http://stackoverflow.com/questions/29442423/detecting-when-a-button-is-touched-in-skscene

    If you want an SKNode to receive touches, set userInteractionEnabled to YES. Otherwise, the closest ancestor with userInteractionEnabled = YES (which typically is the containing SKScene) will receive a -touchesBegan/-touchesMoved/-touchesEnded message.

    Thursday, February 9, 2017 2:18 PM