示例#1
0
文件: HTTP.cs 项目: Jypeli-JYU/Jypeli
        public void Update(Time time)
        {
            triggers.Update(time);

            foreach (var trig in triggers)
            {
                foreach (var op in trig.ops.FindAll(o => !o.IsCompleted))
                {
                    op.Lifetime -= time.SinceLastUpdate;

                    if (op.Lifetime.TotalSeconds <= 0)
                    {
                        //Game.Instance.MessageDisplay.Add( "!!ABORT" );
                        op.CancellationToken.Cancel();
                        trig.failed++;
                    }
                }

                if (trig.triggered + trig.failed >= trig.ops.Count)
                {
                    triggers.Remove(trig);
                    trig.onCompleted();
                }
            }
        }
示例#2
0
文件: Layer.cs 项目: Anttifer/Jypeli
        public void Update(Time time)
        {
            Objects.Update(time);

//#if !DISABLE_EFFECTS
            Effects.Update(time);
//#endif
        }
示例#3
0
        /// <summary>
        /// Kutsuu tapahtumankäsittelijöitä.
        /// </summary>
        protected void UpdateHandlers(Time time)
        {
            if (handlers == null)
            {
                return;
            }

            handlers.Update(time);
        }
示例#4
0
        /// <summary>
        /// Ajetaan kun pelin tilannetta päivitetään. Päivittämisen voi toteuttaa perityssä luokassa
        /// toteuttamalla tämän metodin. Perityn luokan metodissa tulee kutsua kantaluokan metodia.
        /// </summary>
        /// <param name="time"></param>
        protected override void Update(Time time)
        {
            double dt = time.SinceLastUpdate.TotalSeconds;

            if (PhysicsEnabled)
            {
                Engine.Update(dt);
            }

            base.Update(time);

            // Updating joints must be after base.Update so that the bodies
            // are added to the engine before the joints
            Joints.Update(time);
        }
示例#5
0
 internal void UpdateVibrations(Time time)
 {
     vibrations.Update(time);
     Vibration.Execute(playerIndex, vibrations);
 }
示例#6
0
 internal static void UpdateAll(Time time)
 {
     timers.Update(time);
     timers.ForEach(UpdateTimer, time.SinceLastUpdate);
 }
示例#7
0
 /// <summary>
 /// Ajaa päivityksen kerroksen olioille ja efekteille
 /// </summary>
 /// <param name="time"></param>
 public void Update(Time time)
 {
     Objects.Update(time);
     Effects.Update(time);
 }