Latest | 0.0.3 |
---|---|
Homepage | https://github.com/nberthelot/ToolBox2D |
License | MIT |
Platforms | ios 10.0 |
Frameworks | SpriteKit |
Authors |
ToolBox is a ToolBox2D library for 2D game written in Swift.
Installation
ToolBox2D is available through CocoaPods. To install
it, simply add the following line to your Podfile:
pod 'ToolBox2D'
Texture Manager
//Definition
extension TextureDetails.Atlas {
public static let adventurer = TextureDetails.Atlas("adventurer")
}
extension TextureDetails.Sprite {
public static let adventurerRun = TextureDetails.Sprite("adventurer-run-", atlas: TextureDetails.Atlas.adventurer, timePerFrame: 0.23)
public static let adventurerIdle = TextureDetails.Sprite("adventurer-idle-", atlas: TextureDetails.Atlas.adventurer, timePerFrame: 0.23)
}
//Load atalas
TextureManager.load(atlasNames: ["adventurer"])
//Get textures
let textures = TextureManager.textures(fromDetails: .adventurerIdle)
Requirements
- iOS 10.0+
Author
Nicolas Berthelot
License
ToolBox2D is available under the MIT license. See the LICENSE file for more info.
Latest podspec
{ "name": "ToolBox2D", "version": "0.0.3", "summary": "ToolBox2D is a toolbox ;)", "description": "ToolBox is a spriteKit toolbox", "homepage": "https://github.com/nberthelot/ToolBox2D", "license": { "type": "MIT", "file": "LICENSE" }, "authors": { "nberthelot": "..." }, "source": { "git": "https://github.com/nberthelot/ToolBox2D.git", "tag": "0.0.3" }, "platforms": { "ios": "10.0" }, "source_files": "ToolBox2D/Classes/**/*", "frameworks": "SpriteKit" }
Sun, 09 Sep 2018 10:40:29 +0000