1
드래그 할 수있는 항목으로 툴바 (초기에는 숨김)를 만들고 싶습니다. 버튼을 두드리면 툴바가 나타나서 키보드 애니메이션처럼됩니다. Cocos2d에서 어떻게하는지 묻습니다.cocos2d의 키보드처럼 슬라이드 인 및 슬라이드 아웃 애니메이션
응답 해 주셔서 감사합니다.
드래그 할 수있는 항목으로 툴바 (초기에는 숨김)를 만들고 싶습니다. 버튼을 두드리면 툴바가 나타나서 키보드 애니메이션처럼됩니다. Cocos2d에서 어떻게하는지 묻습니다.cocos2d의 키보드처럼 슬라이드 인 및 슬라이드 아웃 애니메이션
응답 해 주셔서 감사합니다.
서랍 열기 및 닫기에이 코드를 사용했습니다.
-(void)showMyCocos2DDrawer
{
CGSize s = [[CCDirector sharedDirector] winSize];
self.position = ccp(-s.width,0.0f); //do this in ur init method :)
CGPoint pos =ccp(0.0f, 0.0f);
id moveTo = [CCMoveTo actionWithDuration:0.5f position:pos];
id calFun = [CCCallFunc actionWithTarget:self selector:@selector(animDone)];
id seq = [CCSequence actions:moveTo, calFun, nil];
[self runAction:seq];
}
-(void)hideCocos2DDrawer
{
CGSize s = [[CCDirector sharedDirector] winSize];
CGPoint pos =ccp(-s.width, 0.0f);
id moveTo = [CCMoveTo actionWithDuration:0.3f position:pos];
id calFun = [CCCallFunc actionWithTarget:self selector:@selector(goBack)];
id seq = [CCSequence actions:moveTo, calFun, nil];
[self runAction:seq];
}
-(void) animDone
{
//write in code here..
}
-(void)goBack
{
//write out code here..
}
고마워요! 나는 이것을 시험해 보겠다. – MiuMiu