public void Update() { if (UpdateAction != null) { UpdateAction.Invoke(); } }
public override void Update() { float fadeintime = MaxTime * FADETIME; Color = Color.Lerp(_startColor, _endColor, TimeActive / (float)MaxTime); if (TimeActive < fadeintime) { Color *= (TimeActive / fadeintime); } else if (TimeActive > (MaxTime - fadeintime)) { Color *= ((MaxTime - TimeActive) / fadeintime); } Lighting.AddLight(Position, Color.ToVector3() * Scale * 0.5f); if (_action != null) { _action.Invoke(this); } if (TimeActive > MaxTime) { Kill(); } }
/// <summary> /// Called by Framweork internally. Not to be called actively. /// </summary> private void Update() { if (ActiveByHierarchy) { UpdateAction?.Invoke(); } }
private void EditBtn_PreviewMouseDown(object sender, MouseButtonEventArgs e) { var btn = (Border)sender; var data = (PersonEvents)btn.Tag; UpdateAction?.Invoke(data); }
void IUpdateSelectedHandler.OnUpdateSelected(BaseEventData eventData) { if (field.text == CurrentText) { return; } CurrentText = field.text; UpdateAction?.Invoke(); }
public virtual void PerformUpdate(GameTime time) { if (Disabled) { return; } UpdateAction?.Invoke(time, this); foreach (UIElement child in Children) { Task.Run(() => { child.PerformUpdate(time); }); } }
public override void Update() { Velocity *= 0.98f; float halftime = (MaxTime / 2f); opacity = (float)Math.Pow((halftime - Math.Abs(halftime - TimeActive)) / halftime, 0.75); Scale += 0.01f; Rotation += Velocity.X * 0.1f; if (_action != null) { _action.Invoke(this); } if (TimeActive >= MaxTime) { Kill(); } }
public override void Update() { if (!_parent.active || _parent.type != ModContent.NPCType <MeteorMagus_NPC>()) { Kill(); return; } _offset += Velocity; Position = _parent.Center + _offset; _rotation += _rotationVelocity; if (_action != null) { _action.Invoke(this); } int fadeOutStartTime = (_maxTime - _fadeTime); //Fade in after spawning if (TimeActive < _fadeTime) { _opacity = TimeActive / (float)_fadeTime; } //Fade out before dying else if (TimeActive > fadeOutStartTime) { _opacity = 1 - (TimeActive - fadeOutStartTime) / (float)_fadeTime; } //Otherwise full opacity else { _opacity = 1; } if (TimeActive > _maxTime) { Kill(); } }
private void FixedUpdate() { _onFixedUpdate?.Invoke(Time.fixedDeltaTime); }
private void LateUpdate() { _onLateUpdate?.Invoke(Time.deltaTime); }
private void Update() { _onUpdate?.Invoke(Time.deltaTime); }
private void Update() { UpdateAction?.Invoke(Time.deltaTime, Time.unscaledDeltaTime); }
private void Update() { UpdateAction?.Invoke(); }
public void Update(float dt) { UpdateAction?.Invoke(dt); }
public void Update() { UpdateAction?.Invoke(); }
private void btnUpdate_Click(object sender, EventArgs e) { UpdateAction?.Invoke(); }