SHMotionBlurSprite class will function just like a normal sprite, but it will give the children a motion blur effect. You can change the blur duration in seconds with “blurDuration” and change the starting blur alpha with “blurAlpha”.
//initialize a motion blur sprite with the default properties SHMotionBlurSprite *motionBlurSprite = [SHMotionBlurSprite motionBlurSprite]; //set the blur duration to 10 seconds motionBlurSprite.blurDuration = 10.0f; //set the starting blur opacity to 25% motionBlurSprite.blurAlpha = 0.25; //set the blur duration to a negative number to set motion blur to forever motionBlurSprite.blurDuration = SH_MOTION_BLUR_INFINITE; motionBlurSprite.blurDuration = -1.0f; //set the blur duration to zero to turn the motion blur off motionBlurSprite.blurDuration = SH_MOTION_BLUR_NONE; motionBlurSprite.blurDuration = 0;
#include "SHMotionBlurSprite.h"
#import "SHMotionBlurSprite.h"