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(); } } }
public void Update(Time time) { Objects.Update(time); //#if !DISABLE_EFFECTS Effects.Update(time); //#endif }
/// <summary> /// Kutsuu tapahtumankäsittelijöitä. /// </summary> protected void UpdateHandlers(Time time) { if (handlers == null) { return; } handlers.Update(time); }
/// <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); }
internal void UpdateVibrations(Time time) { vibrations.Update(time); Vibration.Execute(playerIndex, vibrations); }
internal static void UpdateAll(Time time) { timers.Update(time); timers.ForEach(UpdateTimer, time.SinceLastUpdate); }
/// <summary> /// Ajaa päivityksen kerroksen olioille ja efekteille /// </summary> /// <param name="time"></param> public void Update(Time time) { Objects.Update(time); Effects.Update(time); }