Sprite Kit编程指南(19)
时间:2025-04-06
时间:2025-04-06
ios原生游戏开发
hull.physicsBody = [SKPhysicsBody bodyWithRectangleOfSize:hull.size];
2. newSpaceship hull.physicsBody.dynamic = NO;
。
3. createSceneContents SKAction * makeRocks = [SKAction sequence:@ [
[SKAction performSelector:@selector(addRock) onTarget:self]
[SKAction waitForDuration:0.10 withRange:0.15]
]];
[self runAction:[SKAction repeatActionForever:makeRocks];
”
4. addRock static inline CGFloat skRandf() {
return rand()/(CGFloat)RAND_MAX;
}
上一篇:电脑绘制卡通漫画