예제 #1
0
            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;
                }
            }
예제 #2
0
 void OnDisable()
 {
     if (_fig != null)
     {
         _fig.Dispose();
         _fig = null;
     }
 }
예제 #3
0
 void OnEnable()
 {
     _fig = new GLFigure();
 }