Skip to content

ymmtshny/SpriteKitWithUIKitSample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SpriteKitWithUIKitSample

License Xcode 9.0+ Swift 4.0+

This project contains sample codes of mixing UIKit and SpriteKi.

Sample1

Here is Source Codes for this sample.

When the user tapped a button, call addParticle function.

internal func addParticle(center:CGPoint){
        if let node = SKEmitterNode(fileNamed: "ParticleTest_1") {
            node.position = center
            self.addChild(node)
            node.run(
                SKAction.sequence([
                    SKAction.wait(forDuration: 10.0),
                    SKAction.removeFromParent()
                    ])
            )
        }
    }

Sample2

Here is Source Codes for this sample.

Set the following image as ParticleTest_2's texture.

Releases

No releases published

Packages

No packages published

Languages