Exemplo n.º 1
0
 public override void Update()
 {
     if (ClockDisplay != null)
     {
         ClockDisplay.Text = time.GetTime().ToString("HH:mm:ss");
         DateDisplay.Text  = time.GetTime().ToString("dd:MM:yy");
     }
     // Do stuff every new frame
 }
Exemplo n.º 2
0
        public override void Update()
        {
            CurrentAngle = (float)((360f / 86400000f) * time.GetTime().TimeOfDay.TotalMilliseconds);

            //Log.Info("Current angle " + CurrentAngle);
            Entity.Transform.Rotation = Quaternion.RotationY(CurrentAngle) + Quaternion.RotationZ(23);
        }
Exemplo n.º 3
0
        public override void Update()
        {
            if (timer <= 0)
            {
                SelectNewSite();
                timer = 20;
            }

            timer -= Game.UpdateTime.Elapsed.TotalSeconds;

            if (ClockDisplay != null)
            {
                ClockDisplay.Text = time.GetTime().AddHours(currentSite.Offset).ToString("HH:mm:ss");
                BlurbDisplay.Text = currentSite.Blurb;
                TitleBlock.Text   = currentSite.Name;
            }

            if (timer > 17)
            {
                CameraGimble.Transform.Rotation = Quaternion.Slerp(currentRotation, targetRotation, (20f - (float)timer) / 3f);
            }
            else
            {
                currentRotation = targetRotation;
            }



            // Do stuff every new frame
        }
Exemplo n.º 4
0
        public override void Update()
        {
            CurrentAngle = (float)((360f / 31557600) * (((31557600 / 365) * time.GetTime().DayOfYear) + time.GetTime().TimeOfDay.TotalSeconds));

            //Log.Info("Current sun angle " + CurrentAngle);
            Entity.Transform.Rotation = Quaternion.RotationY(CurrentAngle);
        }