2012-02-28 9 views

答えて

3

私は、それが動作すると思いますが、それは良くない

- (void) restart 
{ 
    [[CCDirector sharedDirector] replaceScene:[[self class] node]]; 
} 

のようなものを呼び出そうとすることができます。 IMHO、このようなスムースを使う方がはるかに良いです。

- (void) restart 
{ 
    // remove all your content 
    [self removeAllChildrenWithCleanup]; 

    // reinitialize your instances 

    // re-add content again 
    [self addContent]; 
} 
+1

ありがとうございます。 'replaceScene:[[self class] node]];'は動作します。 – Dalinaum

関連する問題