/* * * * Lifecycle methods * * * */ void OnEnable() { OnSelectColorScheme += this.respondToOtherItemSelected; if (this.isLocked) { // check whether it should still be locked this.isLocked = (this.colorSchemeID > 1 && DataAndSettingsManager.getNumBoughtForStoreItem(this.packName) == 0); if (!this.isLocked) { this.nameLabel.text = this.colorSchemeName; } } }
void OnDisable() { OnSelectColorScheme -= this.respondToOtherItemSelected; }