public static void Drawing_OnEndScene() { if (!Program.BaseUltMenu["showrecalls"].Cast <CheckBox>().CurrentValue&& !BaseUltUnits.Any()) { return; } Drawing.DrawLine(X, Y, X + Length, Y, Height, ColorTranslator.FromHtml("#080d0a")); if (BaseUltUnits.Any()) { Warning.Draw(new Vector2(Player.HPBarPosition.X + 40, Player.HPBarPosition.Y - 40)); Underline.Draw(new Vector2(X - 50, Y + 30)); } foreach (var recall in Recalls.OrderBy(h => h.Started)) { if ((recall.Unit.IsAlly && !Program.BaseUltMenu["showallies"].Cast <CheckBox>().CurrentValue) || (!recall.Unit.IsAlly && !Program.BaseUltMenu["showenemies"].Cast <CheckBox>().CurrentValue)) { continue; } var recallDuration = recall.Duration; if (recall.Status == RecallStatus.Active) { var isBaseUlt = BaseUltUnits.Any(h => h.Unit.NetworkId == recall.Unit.NetworkId); var percent = GetRecallPercent(recall); var colorIndicator = isBaseUlt ? Color.OrangeRed : (recall.Unit.IsAlly ? Color.DeepSkyBlue : Color.DarkViolet); var colorText = isBaseUlt ? Color.OrangeRed : (recall.Unit.IsAlly ? Color.DeepSkyBlue : Color.PaleVioletRed); var colorBar = isBaseUlt ? Color.Red : (recall.Unit.IsAlly ? Color.DodgerBlue : Color.MediumVioletRed); Bar.Color = colorBar; Bar.Rectangle = new Rectangle(0, 0, (int)(260 * percent), 22); Bar.Draw(new Vector2(X, Y + 4)); Drawing.DrawLine((int)(percent * Length) + X - (float)(LineThickness * 0.5) + 4, Y - (float)(Height * 0.5), (int)(percent * Length) + X - (float)(LineThickness * 0.5) + 4, Y + (float)(Height * 0.5) + recall.TextPos * 20, LineThickness, colorIndicator); Text.Color = colorText; Text.TextValue = "(" + (int)(percent * 100) + "%) " + recall.Unit.ChampionName; Text.Position = new Vector2((int)(percent * Length) + X - LineThickness, Y + (int)(Height * 0.5 + 20 + LineThickness) + recall.TextPos * 20); Text.Draw(); } if (recall.Status == RecallStatus.Abort || recall.Status == RecallStatus.Finished) { const int fadeoutTime = 3; var colorIndicator = recall.Status == RecallStatus.Abort ? Color.OrangeRed : Color.GreenYellow; var colorText = recall.Status == RecallStatus.Abort ? Color.Orange : Color.GreenYellow; var colorBar = recall.Status == RecallStatus.Abort ? Color.Yellow : Color.LawnGreen; var fadeOutPercent = (recall.Ended + fadeoutTime - Game.Time) / fadeoutTime; if (recall.Ended + fadeoutTime > Game.Time) { var timeUsed = recall.Ended - recall.Started; var percent = timeUsed > recallDuration ? 1 : timeUsed / recallDuration; Bar.Color = colorBar; Bar.Rectangle = new Rectangle(0, 0, (int)(260 * percent), 22); Bar.Draw(new Vector2(X, Y + 4)); Drawing.DrawLine((int)(percent * Length) + X - (float)(LineThickness * 0.5) + 4, Y - (float)(Height * 0.5), (int)(percent * Length) + X - (float)(LineThickness * 0.5) + 4, Y + (float)(Height * 0.5), LineThickness, Color.FromArgb((int)(254 * fadeOutPercent), colorIndicator)); Text.Color = colorText; Text.TextValue = recall.Unit.ChampionName; Text.Position = new Vector2((int)(percent * Length) + X - LineThickness, Y + (int)(Height * 0.5 + 20 + LineThickness) + recall.TextPos * 20); Text.Draw(); } else { recall.Status = RecallStatus.Inactive; recall.TextPos = 0; } } } foreach (var unit in BaseUltUnits) { var duration = Recalls.Find(h => h.Unit.NetworkId == unit.Unit.NetworkId).Duration; var barPos = (unit.FireTime - Recalls.Find(h => unit.Unit.NetworkId == h.Unit.NetworkId).Started) / duration; Drawing.DrawLine((int)(barPos * Length) + X - (float)(LineThickness * 0.5), Y - (float)(Height * 0.5 + LineThickness), (int)(barPos * Length) + X - (float)(LineThickness * 0.5), Y + (float)(Height * 0.5 + LineThickness), LineThickness, Color.Lime); } Hud.Draw(new Vector2(X - 8, Y - 5)); }
public void Draw(Vector2 Position) { Sprite.Draw(Position); }