protected virtual void UpdateVersion() { if (version == CURRENT_VERSION) { // No need to update return; } // Tell all components that implement IUpdateable to update to the new version foreach (Component component in GetComponents <Component>()) { IUpdateable u = component as IUpdateable; if (u != null) { u.UpdateToVersion(version, CURRENT_VERSION); } } version = CURRENT_VERSION; }
protected virtual void UpdateVersion() { if (version == FungusConstants.CurrentVersion) { // No need to update return; } // Tell all components that implement IUpdateable to update to the new version foreach (Component component in GetComponents <Component>()) { IUpdateable u = component as IUpdateable; if (u != null) { u.UpdateToVersion(version, FungusConstants.CurrentVersion); } } version = FungusConstants.CurrentVersion; }
protected virtual void UpdateVersion() { if (version == FungusConstants.CurrentVersion) { // No need to update return; } // Tell all components that implement IUpdateable to update to the new version var components = GetComponents <Component>(); for (int i = 0; i < components.Length; i++) { var component = components[i]; IUpdateable u = component as IUpdateable; if (u != null) { u.UpdateToVersion(version, FungusConstants.CurrentVersion); } } version = FungusConstants.CurrentVersion; }