static public LevelAttributesCS GetInstance() { if (!instance) { instance = (LevelAttributesCS) Object.FindObjectOfType( typeof(LevelAttributesCS) ) ; if (!instance) { Debug.LogError("There needs to be one active LevelAttributes script on a GameObject in your scene."); } } return instance; }
void OnDisable () { instance = null; }
void Awake () { // Set up our convenience references. levelAttributes = LevelAttributesCS.GetInstance (); levelBounds = levelAttributes.bounds; }