Skip to content

Instantly share code, notes, and snippets.

@sabresaurus
Created March 11, 2016 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sabresaurus/da791979ea339ec6723f to your computer and use it in GitHub Desktop.
Save sabresaurus/da791979ea339ec6723f to your computer and use it in GitHub Desktop.
// Example of how to use AutoComponent ( https://gist.github.com/sabresaurus/339fcaab18ea7c6a2c53 )
[AutoComponent(RecursiveDirection.Up)]
Agent parentAgent;
[AutoComponent(RecursiveDirection.Down)]
MuzzleFlash muzzleFlash;
[AutoComponent(RecursiveDirection.Down)]
GunAnimator gunAnimator;
void Start()
{
// Hook up the component references
AutoComponent.Setup(this);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment