#import "cocos2d.h"
#import "Bullet.h"
@implementation Bullet
//
//-(id) init
//{
// self = [super init];
// if (self)
// {
// self = [CCSprite spriteWithFile:@"0001.png"];
// //;
// }
// return self;
//}
//
-(void)start1
{
//定时期设定
[self schedule:@selector(up) interval:1/20.0];
}
//自己运行
-(void )up
{
CGFloat x;
x= self.position.x;
//NSLog(@"%f",self.position.y);
//
int y=self.position.y +10;
self.position = ccp(x, y);
if (y> 480) {
//自动把精灵释放
[self removeFromParentAndCleanup:YES];
}
}
-(void)dealloc
{
[super dealloc];
}
@end