SXPointSpriteGroup

type:
extension
author:
Malcolm
description:
Create a point sprite group for things like particle effects.
lastupdate:
2011-04-11
compatible:
v1.1
tag:
point sprites, particles
homepage:
https://gist.github.com/912119
download:
https://gist.github.com/gists/912119/download

Usage

Subclass the class and override the update method to mess with particles:

- (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];
}

Changelog

Source Code

Discussion

No comments so far. Feel free to edit this part of the page.