public static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); overlayForm = new OverlayForm(); Application.Run(overlayForm); }
public static void Start(Action startingMethod, Action recurringMethod) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); overlayForm = new OverlayForm(); overlayForm.SetStartingMethod(startingMethod); overlayForm.SetRecurringMethod(recurringMethod); Application.Run(overlayForm); }
//Update renderQueue with sprites that can be rendered internal static void UpdateRenderQueue(List <Sprite> sprites, List <Sprite> renderQueue, OverlayForm overlayForm) { renderQueue.Clear(); foreach (Sprite sprite in sprites) { //Determine if conditions are met for the sprite to be rendered if (sprite.parentEntity != null && sprite.parentEntity.GetComponent <Transform>() != null && sprite.GetSprite() != null) { while (overlayForm.isPainting) { Thread.Sleep(100); } sprite.SetSpriteToRender(); while (overlayForm.isPainting) { Thread.Sleep(100); } renderQueue.Add(sprite); } } }