Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save domingoladron/f5645eeab22ec86a792279d4c01ddced to your computer and use it in GitHub Desktop.
Save domingoladron/f5645eeab22ec86a792279d4c01ddced to your computer and use it in GitHub Desktop.
An example powersprite animator event, node and prefab instantiation
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