-(FileGame *)objectAtXandY:(int) posX secondPos:(int)posY
{
if (posX < 0 || posX >= kBoxWidth || posY < 0 || posY >= kBoxHeight)
return OutBorderStart;
return (FileGame*)[[content objectAtIndex:posY]objectAtIndex:posX];
}
-(void) checkWith:(BOOL)orien
{
int iMax = (orien == isLandscape) ? size1.width : size1.height;
int jMax = (orien == isPortrait) ? size1.height : size1.width;
for (int i=0; i<iMax; i++)
{
int count = 0;
int balValue = -1;
for (int j=0; j<jMax; j++)
{
FileGame* tile =[self objectAtXandY:(orien == isLandscape) ?i :j secondPos:(orien == isPortrait) ?j :i];
[readyToRemove addObject:tile];
}
}
FileGame* square = [readyToRemove objectAtIndex:2];
square.value1 = 0;
if(square.value1==balVal)
{
//some thing to do
}
else{
//some thing to do
}
}
다음 인스턴스로 전송이있는 NSMutableArray는 balVal는 int이며 readyToRemove입니다 FileGame은 내가 납니다이 실행 CCNode.While입니다 - [__ NSCFNumber의 값 1은] : 인식 할 수없는 선택기 인스턴스에 전송 오류 도와주세요.- [__ NSCFNumber의 값 1] : 인식 할 수없는 선택기
배열'readyToRemove'에는'FileGame' 객체가 아닌 NSNumber가 포함되어 있습니다. 해당 배열을 채우는 방법을 확인하십시오. – Jkmn
예 FileGame 객체 만 있습니다. 2 배열의 인덱스 값입니다 – Prabakaran
배열을 채우기 위해 사용하는 코드로 게시물을 편집, 내가 무슨 뜻인지 이해가 안돼. – Jkmn