1

I'm making a project with SpriteBuilder.
What I would like to know is if there is anyway of transitioning when I make a layer visible?
For example when I change scenes, I uses this replaceScene:scene withTransition:[CCTransition transitionPushWithDirection:CCTransitionDirectionLeft duration:0.25f.
Now I have a CCNode Layer in my SpriteBuilder project which is hidden, I also have a button to show this hidden node.

- (void)rules {

    _rules.visible = TRUE;
}

Is there any way I could make a transition when I make _rules visible?

Also when I make the node visible, it still allows me to press buttons behind the node. Any way to stop this?

Larme
  • 24,190
  • 6
  • 51
  • 81
claustro
  • 13
  • 5

1 Answers1

0

You can use a fade in action, for example:

- (void)rules {

    _rules.visible = YES;
    [_rules runAction:[CCActionFadeIn actionWithDuration:1.0]];

}
lucianomarisi
  • 1,552
  • 11
  • 24