public void DrawPaint(object sender, PaintEventArgs e) { if (!drawing) { return; } Graphics g = e.Graphics; g.CompositingQuality = CompositingQuality.HighQuality; g.SmoothingMode = SmoothingMode.AntiAlias; g.InterpolationMode = InterpolationMode.Low; g.TextRenderingHint = TextRenderingHint.AntiAlias; g.ScaleTransform(scalar, scalar); try { Map?.Draw(g); DrawWhite?.Invoke(g); Blast.DrawAll(g); DrawTail?.Invoke(g); DrawBullet?.Invoke(g); DrawHead?.Invoke(g); DrawKeys?.Invoke(g); DrawAnimation?.Invoke(g); if (ActiveKeys.Contains(Leader)) { Map.DrawCrown(g); } MVP.Draw(g); } catch (Exception) { } }
void DrawItem(DrawHead draw_head, DrawBody draw_body) { EditorGUILayout.BeginVertical(GUI.skin.textField); EditorGUILayout.BeginHorizontal(GUI.skin.button); bool enable_body_edit = draw_head(); EditorGUILayout.EndHorizontal(); EnterSection(enable_body_edit); draw_body(); ExitSection(); EditorGUILayout.EndVertical(); }