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:sx_point_sprite_group [2011/04/11 22:29]
pixelrevision [Usage]
extensions:sx_point_sprite_group [2015/09/14 11:14] (current)
Line 1: Line 1:
 +~~NOTOC~~
  
 +====== SXPointSpriteGroup ======
 +
 +---- dataentry extension ----
 +type          : extension #or '​mod'​ if it requires changing the Sparrow source
 +author_mail ​  : pixelrevision@gmail.com Malcolm
 +description ​  : Create a point sprite group for things like particle effects. #enter a short description of the extension
 +lastupdate_dt : 2011-04-11 #the date you created the extension
 +compatible ​   : v1.1 #the Sparrow version you tested the extension with
 +depends ​      : ​ #if the ext. depends on others, list them here
 +tags          : point sprites, particles #enter a few tags, separated by commas
 +homepage_url ​ : https://​gist.github.com/​912119 #if the ext. has an URL (e.g. a Gist-page), add it here
 +download_url ​ : https://​gist.github.com/​gists/​912119/​download #a direct link to the download (e.g. the Gist-archive)
 +----
 +
 +===== Usage =====
 +Subclass the class and override the update method to mess with particles:
 +<​code>​
 +- (void)update:​(SPEnterFrameEvent*)event{
 + for(int i=0; i<​numPointSprites;​ i++){
 + SXPSData *ps = &​pointSprites[i];​
 + ps->x += i * .1;
 + ps->y += i * .1;
 + }
 + [super update:​event];​
 +}
 +</​code>​
 +
 +
 +===== Changelog =====
 +
 +  * //​2011/​04/​11 22:24//: First public version
 +
 +===== Source Code =====
 +
 +
 +%gist(912119)%
 +
 +===== Discussion =====
 +
 +//No comments so far. Feel free to edit this part of the page.//
  extensions/sx_point_sprite_group.txt · Last modified: 2015/09/14 11:14 (external edit)
 
Powered by DokuWiki