Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
extensions:esprite [2012/02/26 05:03]
efranford [Example Screenshots]
extensions:esprite [2015/09/14 11:15] (current)
Line 1: Line 1:
 +~~NOTOC~~
  
 +====== ESprite ======
 +
 +---- dataentry extension ----
 +type          : extension ​ # or '​mod'​ if it requires changing the Sparrow source ​
 +author_mail ​  : elliot.franford@gmail.com Elliot Franford ​
 +description ​  : This is an enhanced sprite for sparrow ​          # enter a short description of the extension
 +lastupdate_dt : 2012-02-25 # the date you created the extension
 +compatible ​   : v1.2       # the Sparrow version you tested the extension with
 +depends ​      : ​           # if the ext. depends on others, list them here
 +tags          : sprite,​ESprite ​           # enter a few tags, separated by commas
 +homepage_url ​ :   ​https://​github.com/​efranford/​SparrowEnhancedSprite ​        # if the ext. has an URL (e.g. a Gist-page), add it here
 +download_url ​ :  https://​github.com/​efranford/​SparrowEnhancedSprite/​zipball/​master ​         # a direct link to the download (e.g. the Gist-archive)
 +----
 +
 +===== Usage =====
 +
 +The Sparrow Enhanced Sprite aims at making and managing sprites easier.
 +
 +Quick and dirty to make a sprite you can just do:
 +
 +<code objc>
 +ESprite* sprite = [[ESprite alloc]initWithESpriteFile:​@"​sprite.xml"​ AndInitialAnimation:​@"​startingAnimation"​];​
 +[self addChild:​sprite];​
 +</​code>​
 +
 +To do this you need to define an ESprite in an xml file.  The XML object expected looks like:
 +
 +<code xml>
 +<?xml version="​1.0"​ encoding="​UTF-8"?>​
 +<ESprite name="​spriteName"​ spriteAtlas="​atlasFile.xml">​
 +    <State name="​someState"​ animationPrefix="​prefixInAtlas"​ animationFPS="#"​ loop="​bool"​ />
 +    ...
 +</​ESprite>​
 +</​code>​
 +
 +I recommend [[https://​github.com/​efranford/​SparrowEnhancedSprite/​tree/​master/​example|downloading the example]] on github and trying that out.
 +
 +===== Example Screenshot =====
 +{{ http://​img163.imageshack.us/​img163/​2129/​esprite1.png?​200 |}}
 +===== Changelog =====
 +
 +  * //​2012/​02/​26 03:16//: First public version
 +
 +===== Source Code =====
 +
 +%gist(1912407)%
 +
 +===== Discussion =====
 +
 +//No comments so far. Feel free to edit this part of the page.//
  extensions/esprite.txt · Last modified: 2015/09/14 11:15 (external edit)
 
Powered by DokuWiki