0
41 개 벽돌을 움직여 화면 상단에서 6x7 크기의 그리드에 떨어 뜨리려고 게임을 시작할 때 노력하고 있습니다. 그러나 지금까지는 벽돌을 같은 위치에 떨어 뜨리는 것. 애니메이션 부분을 제거하면 모눈에 모든 벽돌이 나타납니다. 벽돌은 계단의 효과를 창출하기 위해 이전 벽돌 다음에 1 ~ 2 밀리미터 정도 떨어져 있어야합니다.COCOS2D : 떨어지는 벽돌을 그리드로 움직이는 방법
나는 그 직책이 문제라는 것을 알고 있지만 어떻게 고쳐야할지 모르겠다.
-(void)AnimateBricksFalling
{
self.allowTouch = NO;
for(int i =0; i< GRID_WIDTH ; i++)
{
for(int j =0; j< GRID_HEIGHT ; j++)
{
Bricks * d = grid[i][j];
d.mySprite.position = ccp(168,1000); //the position is the issue, making all the bricks to fall down to the same position
CCMoveTo *move = [CCMoveTo actionWithDuration:0.5 position:ccp(168,91)]; //the position is the issue, making all the bricks to fall down to the same position
[d.mySprite runAction: move];
}
}
}
감사합니다. 그것은 일했다! :디 – peteriphonenoob