示例#1
0
        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;
        }
示例#2
0
 private static void Entities_OnCloseAll()
 {
     MyAPIGateway.Entities.OnCloseAll -= Entities_OnCloseAll;
     Instance = null;
 }
示例#3
0
 public SunProperties()
 {
     Instance = this;
 }