예제 #1
0
파일: Sun.cs 프로젝트: ututrc/ME-UnitySDK
        // Use this for initialization
        void Start()
        {
            sunUpdateTimer          = new System.Timers.Timer(1000);
            sunUpdateTimer.Elapsed += new ElapsedEventHandler(this.onSunUpdate);
            //sunUpdateTimer.Interval = 10000;
            sunUpdateTimer.Enabled = true;

            playerLocation = new Vector3(0.0f, 0.0f, 0.0f);
            //playerLocation.x = ApplicationManager.Instance.getGeolocationManager ().getGeolocation ().x;
            //playerLocation.y = ApplicationManager.Instance.getGeolocationManager ().getGeolocation ().y;
            sunLocation = SunDirection.CalculateSunPosition(DateTime.Now, playerLocation.x, playerLocation.y);
        }
예제 #2
0
파일: Sun.cs 프로젝트: ututrc/ME-UnitySDK
 private void onSunUpdate(object source, ElapsedEventArgs e)
 {
     sunUpdateTimer.Interval = 2000;
     sunLocation             = SunDirection.CalculateSunPosition(DateTime.Now, playerLocation.x, playerLocation.y);
 }