public void Draw(GLFigure fig) { switch (shape) { case ShapeEnum.Circle: if (fill == FillEnum.Edge) { fig.DrawCircle(transform.position, transform.rotation, transform.localScale, color); } else { fig.FillCircle(transform.position, transform.rotation, transform.localScale, color); } break; case ShapeEnum.Quad: if (fill == FillEnum.Edge) { fig.DrawQuad(transform.position, transform.rotation, transform.localScale, color); } else { fig.FillQuad(transform.position, transform.rotation, transform.localScale, color); } break; } }
void OnDisable() { if (_fig != null) { _fig.Dispose(); _fig = null; } }
void OnEnable() { _fig = new GLFigure(); }