Skip to content

Instantly share code, notes, and snippets.

@sylistine
Created January 21, 2016 03:05
Show Gist options
  • Save sylistine/d9ef5cdb4a9a1b5b2cce to your computer and use it in GitHub Desktop.
Save sylistine/d9ef5cdb4a9a1b5b2cce to your computer and use it in GitHub Desktop.
class AaronBehaviour : MonoBehaviour
{
protected AudioController audio
{
get
{
return _audio;
}
}
private AudioController _audio; // This should theoretically be universal and doesn't get instantiated even when AaronBehaviour is inherited
}
class Player : AaronBehaviour
{
public AudioClip attackSound;
void Start()
{
audio.PlayClip(attackSound);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment