//h파일


#import "cocos2d.h"


@interface SpritePosChange : CCScene {

}


-(void) SpritePosChange:(CCSprite*)mSprite : (int) xPos : (int) yPos;


@end




//m파일

#import "SpritePosChange.h"



@implementation SpritePosChange

-(id) init

{

if((self = [super init]))

{

}

return self;

}

-(void) SpritePosChange:(CCSprite*)mSprite : (int) xPos : (int) yPos

{

mSprite.anchorPoint = ccp(0,1);

mSprite.position = ccp(xPos,480-yPos);

}

-(void)dealloc

{

[super dealloc];

}


@end



//아주 간단한 클래스 입니다 ^^ 왕초보라서.~! 그냥 좌상단이 보통 0,0 인데  OpenGl의 기준점은 좌하단이 0,0으로 되어 있어서 
  디자이너들의 좌표 와 정반대로 찍혀 있어서 그냥 만들어 봤음. ^^

//

+ Recent posts