mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-12-25 03:43:12 +00:00
28 lines
708 B
C#
28 lines
708 B
C#
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using SanAndreasUnity.Behaviours.World;
|
|
using SanAndreasUnity.UI;
|
|
|
|
namespace SanAndreasUnity.Settings {
|
|
|
|
public class WorldSettings : MonoBehaviour {
|
|
|
|
OptionsWindow.FloatInput m_maxDrawDistanceInput = new OptionsWindow.FloatInput() {
|
|
description = "Max draw distance",
|
|
minValue = 50,
|
|
maxValue = 1000,
|
|
isAvailable = () => Cell.Instance != null,
|
|
getValue = () => Cell.Instance.maxDrawDistance,
|
|
setValue = (value) => { Cell.Instance.maxDrawDistance = value; },
|
|
persistType = OptionsWindow.InputPersistType.AfterLoaderFinishes
|
|
};
|
|
|
|
|
|
void Awake ()
|
|
{
|
|
OptionsWindow.RegisterInputs ("WORLD", m_maxDrawDistanceInput);
|
|
}
|
|
|
|
}
|
|
|
|
}
|