public SunProperties() { MyObjectBuilder_EnvironmentDefinition environmentDefinition = MyDefinitionManager.Static.EnvironmentDefinition.GetObjectBuilder() as MyObjectBuilder_EnvironmentDefinition; DefSunDirection = environmentDefinition.SunDirection; SunRotationIntervalMinutes = MyAPIGateway.Session.SessionSettings.SunRotationIntervalMinutes; EnableSunRotation = MyAPIGateway.Session.SessionSettings.EnableSunRotation; mySunDirection = DefSunDirection; myLogger.debugLog("Definition SunDirection: " + mySunDirection + ", EnableSunRotation: " + EnableSunRotation + ", SunRotationIntervalMinutes: " + SunRotationIntervalMinutes, Logger.severity.INFO); float azimuth, elevation; Vector3.GetAzimuthAndElevation(mySunDirection, out azimuth, out elevation); myLogger.debugLog("azimuth: " + azimuth + ", elevation: " + elevation, Logger.severity.DEBUG); Instance = this; }
private static void Entities_OnCloseAll() { MyAPIGateway.Entities.OnCloseAll -= Entities_OnCloseAll; Instance = null; }
public SunProperties() { Instance = this; }