private void UpdateImpactEffects(float t) { for (int index = 0; index < this.ImpactEffects.Count; ++index) { TraceKillExe.PointImpactEffect impactEffect = this.ImpactEffects[index]; impactEffect.timeEnabled += t; if ((double)impactEffect.timeEnabled > (double)DLCIntroExe.NodeImpactEffectTransInTime + (double)DLCIntroExe.NodeImpactEffectTransOutTime) { this.ImpactEffects.RemoveAt(index); --index; } else { this.ImpactEffects[index] = impactEffect; } } }
private void DrawImpactEffects(List <TraceKillExe.PointImpactEffect> Effects) { Utils.LCG.reSeed(this.PID); for (int index = 0; index < Effects.Count; ++index) { Color color = Color.Lerp(Utils.AddativeWhite, Utils.AddativeRed, (float)(0.600000023841858 + 0.400000005960464 * (double)Utils.LCG.NextFloatScaled())) * (float)(0.600000023841858 + 0.400000005960464 * (double)Utils.LCG.NextFloatScaled()); TraceKillExe.PointImpactEffect effect = Effects[index]; Vector2 location = effect.location; float num1 = Utils.QuadraticOutCurve(effect.timeEnabled / DLCIntroExe.NodeImpactEffectTransInTime); float num2 = Utils.QuadraticOutCurve(Utils.QuadraticOutCurve(effect.timeEnabled / (DLCIntroExe.NodeImpactEffectTransInTime + DLCIntroExe.NodeImpactEffectTransOutTime))); float num3 = Utils.QuadraticOutCurve((effect.timeEnabled - DLCIntroExe.NodeImpactEffectTransInTime) / DLCIntroExe.NodeImpactEffectTransOutTime); effect.cne.color = color * num1; effect.cne.ScaleFactor = num2 * effect.scaleModifier; if ((double)effect.timeEnabled > (double)DLCIntroExe.NodeImpactEffectTransInTime) { effect.cne.color = color * (1f - num3); } if ((double)num1 >= 0.0 && effect.HasHighlightCircle) { this.spriteBatch.Draw(this.circle, location, new Rectangle?(), color * (float)(1.0 - (double)num1 - ((double)num3 >= 0.0 ? 1.0 - (double)num3 : 0.0)), 0.0f, new Vector2((float)(this.circle.Width / 2), (float)(this.circle.Height / 2)), (float)((double)num1 / (double)this.circle.Width * 60.0), SpriteEffects.None, 0.7f); } effect.cne.draw(this.spriteBatch, location); } }
private void DrawImpactEffects(SpriteBatch sb, Rectangle dest) { Color color = this.os.traceTracker.active ? Color.Red : Utils.AddativeWhite; for (int index = 0; index < this.ImpactEffects.Count; ++index) { TraceKillExe.PointImpactEffect impactEffect = this.ImpactEffects[index]; Vector2 vector2 = new Vector2((float)dest.X + impactEffect.location.X * (float)dest.Width, (float)dest.Y + impactEffect.location.Y * (float)dest.Height); if ((double)impactEffect.timeEnabled <= 1.0) { float num = Utils.QuadraticOutCurve(Utils.QuadraticOutCurve(impactEffect.timeEnabled / 1f)); impactEffect.cne.color = color * num; impactEffect.cne.ScaleFactor = num; sb.Draw(this.circle, vector2, new Rectangle?(), color * (1f - num), 0.0f, new Vector2((float)(this.circle.Width / 2), (float)(this.circle.Height / 2)), (float)((double)num / (double)this.circle.Width * 30.0), SpriteEffects.None, 0.7f); } else { float num = Utils.QuadraticOutCurve((float)(((double)impactEffect.timeEnabled - 1.0) / 2.0)); impactEffect.cne.color = color * (1f - num); impactEffect.cne.ScaleFactor = 1f; } impactEffect.cne.draw(sb, vector2); } }
private void UpdateEffect(float t) { float num = 1f; if (this.os.traceTracker.active) { num = 1.6f; } this.timer += t * num; Vector2 vector2 = new Vector2((float)Math.Sin((double)this.timer * 2.0), (float)Math.Sin((double)this.timer)) * 0.4f + new Vector2(0.5f); if (this.isOnFocusPoint && (double)this.focusPointTransitionTime >= 1.20000004768372) { this.EffectFocus = this.focusPointLocation; this.timeOnFocusPoint += t; if (!this.hasDoneBurstForThisFocusPoint) { this.ImpactEffects.Add(new TraceKillExe.PointImpactEffect(this.focusPointLocation, this.os)); this.hasDoneBurstForThisFocusPoint = true; } if ((double)this.timeOnFocusPoint >= (double)this.focusPointIdleTime) { this.isOnFocusPoint = false; this.focusPointTransitionTime = 1.2f; this.timeTillNextFocusPoint = Utils.randm(4f); } } else if (this.isOnFocusPoint && (double)this.focusPointTransitionTime < 1.20000004768372 || !this.isOnFocusPoint && (double)this.focusPointTransitionTime > 0.0) { this.focusPointTransitionTime += t * (this.isOnFocusPoint ? 1f : -1f); float point = this.focusPointTransitionTime / 1.2f; this.EffectFocus = Vector2.Lerp(vector2, this.focusPointLocation, Utils.QuadraticOutCurve(point)); } else { this.EffectFocus = vector2; this.timeTillNextFocusPoint -= t; if ((double)this.timeTillNextFocusPoint <= 0.0) { this.isOnFocusPoint = true; this.focusPointTransitionTime = 0.0f; this.timeOnFocusPoint = 0.0f; this.hasDoneBurstForThisFocusPoint = false; this.focusPointIdleTime = Utils.randm(0.1f); this.focusPointLocation = new Vector2(Utils.randm(1f), Utils.randm(1f)); } } for (int index = 0; index < this.ImpactEffects.Count; ++index) { TraceKillExe.PointImpactEffect impactEffect = this.ImpactEffects[index]; impactEffect.timeEnabled += t; if ((double)impactEffect.timeEnabled > 3.0) { this.ImpactEffects.RemoveAt(index); --index; } else { this.ImpactEffects[index] = impactEffect; } } }