Created
August 31, 2019 22:07
-
-
Save DeltaDizzy/7eee67548e2908dd5662c93a2fcee3a4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using UnityEngine; | |
namespace HowManySeconds | |
{ | |
[KSPAddon(KSPAddon.Startup.MainMenu, true)] | |
public class HMSConfig : MonoBehaviour | |
{ | |
private static ConfigNode hmsnode; | |
private static Double _duration; | |
private static Texture2D _iconTex; | |
private static Boolean _debug; | |
public static Double Duration | |
{ | |
get | |
{ | |
return _duration; | |
} | |
} | |
public static Boolean Debug | |
{ | |
get | |
{ | |
return _debug; | |
} | |
} | |
public static Texture2D Icon | |
{ | |
get | |
{ | |
return _iconTex; | |
} | |
} | |
void Start() | |
{ | |
hmsnode = GameDatabase.Instance.GetConfigs("HowManySeconds")[0].config; | |
_duration = Double.Parse(hmsnode.GetValue("msgDuration")); | |
_iconTex = GameDatabase.Instance.GetTexture(hmsnode.GetValue("iconTexture"), false); | |
_debug = Boolean.Parse(hmsnode.GetValue("debug")); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment