HaskellSpriteKit icon indicating copy to clipboard operation
HaskellSpriteKit copied to clipboard

nodePaused and scenePaused have no effect

Open mo-gr opened this issue 4 years ago • 0 comments

I'm playing around with the SpriteKit binding trying to learn and understand the basics. I have the following simple scene:

import Graphics.SpriteKit 

moveThisNode = (moveTo (Point 200 200)) {actionDuration = 10}

aSprite = (spriteWithColorSize redColor (Size 2 2)) {
  nodePosition = Point 125 125,
  nodeSpeed = 1,
  nodeActionDirectives = [
    RunAction moveThisNode Nothing
  ],
  nodePaused = True
}

sceneWithSprite = (sceneWithSize (Size 250 250)) { 
  scenePaused = True,
  sceneChildren = [aSprite]
}

Since both, the node and the scene are set to be paused, I would expect the sprite not to move.

However, when I render the sceneWithSprite in Haskell for Mac, I clearly see the little red sprite moving.

Am I doing something wrong? Is my understanding of paused wrong?

mo-gr avatar May 02 '20 02:05 mo-gr