Skip to content

Instantly share code, notes, and snippets.

@rlewicki
Created June 28, 2018 20:54
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 rlewicki/3ec15f2f35a6aa86dbf0c87b91048cea to your computer and use it in GitHub Desktop.
Save rlewicki/3ec15f2f35a6aa86dbf0c87b91048cea to your computer and use it in GitHub Desktop.
public class LevelGating : MonoBehaviour
{
public void Initialize()
{
PlayerEvents.PlayerLevelUp += OnPlayerLevelUp;
}
private void OnPlayerLevelUp(int level)
{
// Example usage
if(level > 11)
{
UnlockNewFeature();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment