A visual effect for unity that leaves a series of transparent copies of sprites behind
Download the files and open the project in Unity or place them in your own project. Just make sure to leave the Resources folder intact
Attach GhostingContainer.cs
to a game object that contains a SpriteRenderer.
To start the ghost effect pass in these parameters to the GhostingContainer's init function
- The maximum number of ghosts, of course the more you want the bigger the hit on game performance
- Spawning rate: the rate at which the "ghosts" spawn behind your target
- The sprite renderer of the target in question.
The duration of the effect: how long do you want the effect to last for?No longer in use because I had to change the algorithm. This was causing problems as the effect wasn't lining up properly with the number of ghosts on screen but again. I'm not removing this parameter as some people are still using this function and don't want to break their code. I appologize for the inconvienience.- (Optional ) pass in a color parameter to set the ghosts to a different color.
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D