Ejemplo n.º 1
0
        public static ZombieSettings GetGameSettings()
        {
            ZombieSettings settings = null;
            var            world    = Find.World;

            if (world != null && world.components != null)
            {
                settings = world.components.OfType <ZombieSettings>().FirstOrDefault();
            }
            return(settings);
        }
Ejemplo n.º 2
0
        public override void WriteSettings()
        {
            var settings = ZombieSettings.GetGameSettings();

            if (settings != null)
            {
                settings.WriteSettings();
            }
            else
            {
                ZombieSettingsDefaults.WriteSettings();
            }
        }
Ejemplo n.º 3
0
        public override void DoSettingsWindowContents(Rect inRect)
        {
            var settings = ZombieSettings.GetGameSettings();

            if (settings != null)
            {
                settings.DoWindowContents(inRect);
            }
            else
            {
                ZombieSettingsDefaults.DoWindowContents(inRect);
            }
        }