cocos2d

来源:互联网 发布:普通车床车v型带轮算法 编辑:程序博客网 时间:2024/05/17 01:45
UITextField* _textField = [[[UITextField alloc] initWithFrame:CGRectMake(500,400, 160.0f, 20.0f)] autorelease];        _textField.backgroundColor = [UIColor whiteColor];        _textField.textColor = [UIColor blueColor];        _textField.transform = CGAffineTransformTranslate(CGAffineTransformMakeRotation(M_PI/2), 0, 0);       _textField.delegate=self;        [[[[CCDirector sharedDirector] openGLView] window] addSubview:_textField];

 
CCLabelTTF *label = [CCLabelTTF labelWithString:@'helloworld' fontName:@'Marker Felt' fontSize:64 ];        label.position =  ccp( 500 , 620);        [self addChild: label];--------------------------------------------------------    // ask director the the window size        CGSize size = [[CCDirector sharedDirector] winSize];               // position the label on the center of the screen        label.position =  ccp( size.width /2 , size.height/2 );

[[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:@'game.plist'];CCSprite* backGround=[CCSprite spriteWithFile:@'MenuBackground.png'];            backGround.position=CGPointZero;        backGround.anchorPoint=CGPointZero;        backGround.scale=2;//backGround.scale=1.2f        [self addChild: backGround]; CCSprite* gameframe=[CCSprite spriteWithSpriteFrameName:@'gameframe.png'];        gameframe.position=CGPointZero;        gameframe.anchorPoint=CGPointZero;        [self addChild: gameframe];        id ac0=[CCMoveTo actionWithDuration:5 positiUITextField* _textField = [[[UITextField alloc] initWithFrame:CGRectMake(500,400, 160.0f, 20.0f)] autorelease];        _textField.backgroundColor = [UIColor whiteColor];        _textField.textColor = [UIColor blueColor];        _textField.transform = CGAffineTransformTranslate(CGAffineTransformMakeRotation(M_PI/2), 0, 0);       _textField.delegate=self;        [[[[CCDirector sharedDirector] openGLView] window] addSubview:_textField];