2
我相信这非常简单,但它已经困扰了好几个小时。在多个类中使用*值
说我有以下以下设置:(简体)
-(void) ClassA {
CCSprite *boat = [CCSprite spriteWithFile:@"boat.png"];
[self addChild: boat];
}
-(void) ClassB {
CGPoint velocity = CGPointMake(0, 1);
boat.position = ccpAdd(boat.position, velocity);
}
我将如何让*为船的ClassA ClassB中使用吗?
是'ClassA'和'ClassB'属于同一个类的两种方法,还是他们的命名意味着暗示它们是方法不同的类? – CRD 2012-02-25 20:17:36