我在我的游戏中使用 MenuLevel 来加载关卡.. http://www.prioregroup.com/iphone/menulevel.aspx
目前,一个关卡是否被锁定,它正在加载。如果它被锁定,它不应该被加载。我该怎么做?谢谢..
// 创建菜单项
[menu createMenuItemLevel:1 position:ccp(x, size.height / 2) life:0 locked:NO];
- (void)menuLevel:(MenuLevel *)menuLevel buttonSelected:(id)source
{
CCMenuItem *item = (CCMenuItem*)source;
NSString *msg = [NSString stringWithFormat:@"You have pressed the button # %d", item.tag]; // retrieve level number..
NSLog(@"MenuLevel Sample %@", msg);
// What I want is something like.. if (item.locked == YES) do something
}