Exemplo 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);
        }
Exemplo n.º 2
0
        public override void WriteSettings()
        {
            var settings = ZombieSettings.GetGameSettings();

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

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