Created
January 21, 2016 03:05
-
-
Save sylistine/d9ef5cdb4a9a1b5b2cce to your computer and use it in GitHub Desktop.
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
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