CGPoint itemSprite1position = ccp(100,200);
NSMutableArray * array = [[NSMutableArray alloc] initWithObjects:NSStringFromCGPoint(itemSprite1position),nil];
从数组中取值的过程是这样的:
复制代码
CGPoint point=CGPointFromNSString([array objectAtIndex:0]);
CGPoint itemSprite1position = ccp(100,200);
NSMutableArray * array = [[NSMutableArray alloc] initWithObjects:NSStringFromCGPoint(itemSprite1position),nil];
从数组中取值的过程是这样的:
复制代码
CGPoint point=CGPointFromNSString([array objectAtIndex:0]);