Stop SKAction that RepeatsForever - Sprite Kit

前端 未结 1 1127
名媛妹妹
名媛妹妹 2020-12-10 04:37

I want to run two animations on my spriteNode depending on its rotation. If the value is negative run one of the animations, if it\'s positive run the other. And I managed t

1条回答
  •  Happy的楠姐
    2020-12-10 05:22

    The method is supposed to be called on the node which the SKAction is running on.

    Change

    [self removeActionForKey:@"animation1"]; 
    

    to

    [sprite removeActionForKey:@"animation1"]; 
    

    0 讨论(0)
提交回复
热议问题