//initの処理 CCProgressTimer *timer = [CCProgressTimer progressWithSprite:[CCSprite spriteWithFile:@"test.png"]]; timer.type = kCCProgressTimerTypeRadial; timer.percentage = 100; timer.position = ccp(winSize.width/2, winSize.height/2); [self addChild:timer z:2 tag:123]; [self scheduleUpdate]; - (void) update:(ccTime)delta { CCProgressTimer *timer = (CCProgressTimer*)[self getChildByTag:123]; timer.percentage -= delta * 150; if (timer.percentage <= 0) { timer.percentage = 100; } }
0 件のコメント:
コメントを投稿