internal static bool Prefix(TimeWidget __instance, float angleDegrees)
        {
            if (!Solstice_RV.isEnabled)
            {
                return(true);
            }

            TimeWidgetUpdater.Update(__instance, angleDegrees);
            return(false);
        }
Example #2
0
        internal static void Update(TimeWidget timeWidget, float angleDegrees)
        {
            float normalizedTime = GameManager.GetUniStorm().m_NormalizedTime;
            float sunAngle       = sunInterpolator.GetValue(normalizedTime);

            timeWidget.m_SunSprite.transform.position = timeWidget.m_ArrowSprite.transform.position + GetPositionOnCircle(sunRadius, sunAngle);
            float moonAngle = moonInterpolator.GetValue(normalizedTime);

            timeWidget.m_MoonSprite.transform.position = timeWidget.m_ArrowSprite.transform.position + GetPositionOnCircle(moonRadius, moonAngle);
            //Debug.Log("[Solstice] " + "NormalizedTime: " + normalizedTime + " In hours " + normalizedTime*24f);
        }
 internal static void Postfix(TimeWidget __instance)
 {
     TimeWidgetUpdater.Initialize(__instance);
 }
Example #4
0
 internal static void Initialize(TimeWidget timeWidget)
 {
     sunRadius  = Traverse.Create(timeWidget).Field("m_SunRadius").GetValue <float>();
     moonRadius = Traverse.Create(timeWidget).Field("m_MoonRadius").GetValue <float>();
 }