Example #1
0
        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;
        }
Example #2
0
        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;
        }