Last active
January 4, 2022 03:52
-
-
Save domingoladron/f5645eeab22ec86a792279d4c01ddced to your computer and use it in GitHub Desktop.
An example powersprite animator event, node and prefab instantiation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void AnimSpawn( Object prefabToSpawn ) | |
{ | |
/// Spawn an effect on the position from node 1 in the animation | |
/// prefabToSpawn is the prefab identified in our Event trigger | |
/// SpriteAnimNodes is a C# class included in Powersprite | |
/// which you add to your creature / character animation | |
Instantiate( | |
prefabToSpawn, | |
GetComponent<SpriteAnimNodes>().GetPosition(1), | |
Quaternion.identity | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment