Presentation is loading. Please wait.

Presentation is loading. Please wait.

Ios7 系列视频教程 主讲老师:廖珑程 邮箱地址: Sprite Kit 与 cocos 2d 的对比 内嵌入 ios 系统中 很好的支持纹理和粒子效果 很多其他引擎无法做到的事情,(视 频) 可移植性不好 对 OPENGL 的支持不好.

Similar presentations


Presentation on theme: "Ios7 系列视频教程 主讲老师:廖珑程 邮箱地址: Sprite Kit 与 cocos 2d 的对比 内嵌入 ios 系统中 很好的支持纹理和粒子效果 很多其他引擎无法做到的事情,(视 频) 可移植性不好 对 OPENGL 的支持不好."— Presentation transcript:

1 Ios7 系列视频教程 主讲老师:廖珑程 邮箱地址: ios_coder@126.com

2 Sprite Kit 与 cocos 2d 的对比 内嵌入 ios 系统中 很好的支持纹理和粒子效果 很多其他引擎无法做到的事情,(视 频) 可移植性不好 对 OPENGL 的支持不好

3 Sprite kit 中的基本类 SKView SKScene SKNode SKSpriteNode

4 SKScene SKView

5 SKTexture + (SKTexture *)textureWithImageNamed:(NSString *)name + (SKTexture *)textureWithRect:(CGRect)rect inTexture:(SKTexture *)texture + (SKTexture *)textureWithCGImage:(CGImageRef)image

6 SKTextureAtlas + (SKTextureAtlas *)atlasNamed:(NSString *)name - (SKTexture *)textureNamed:(NSString *)name

7 SKNode Position xScale yScale Alpha Paused Hidden userInteractionEnabled Parent Children + (instancetype)node - (void)addChild:(SKNode *)node (void)removeFromParent (void)removeAllActions - (BOOL)containsPoint:(CGPoint)p

8 SKSpriteNode anchorPoint size + (instancetype)spriteNodeWithTexture:(SKTexture *)texture size: + (instancetype)spriteNodeWithTexture:(SKTexture *)texture SKNode + (instancetype)spriteNodeWithImageNamed:(NSString *)name + (instancetype)spriteNodeWithColor:(SKColor *)color size:(CGSize)size

9 ( 0,0 ) anchorPoint X Y SKScene

10 坐标判断 -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event -(void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event -(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event -(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event UITouch 类别 locationInNode CGRectIntersectsRect(CGRect rect1, CGRect rect2) CGRectContainsRect(CGRect rect1, CGRect rect2) CGRectContainsPoint(CGRect rect, CGPoint point)

11 SKAction + (SKAction *)moveTo:(CGPoint)location duration:(NSTimeInterval)sec + (SKAction *)sequence:(NSArray *)actions + (SKAction *)group:(NSArray *)actions + (SKAction *)playSoundFileNamed:(NSString*)soundFile waitForCompletion:(BOOL)wait + (SKAction *)repeatActionForever:(SKAction *)action + (SKAction *)waitForDuration:(NSTimeInterval)sec + (SKAction *)animateWithTextures:(NSArray *)textures timePerFrame:(NSTimeInterval)sec


Download ppt "Ios7 系列视频教程 主讲老师:廖珑程 邮箱地址: Sprite Kit 与 cocos 2d 的对比 内嵌入 ios 系统中 很好的支持纹理和粒子效果 很多其他引擎无法做到的事情,(视 频) 可移植性不好 对 OPENGL 的支持不好."

Similar presentations


Ads by Google