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

                case ShapeEnum.Fan:
                    if (fill == FillEnum.Edge)
                    {
                        fig.DrawFan(transform.position, transform.rotation, transform.localScale, color, -30f, 30f);
                    }
                    else
                    {
                        fig.FillFan(transform.position, transform.rotation, transform.localScale, color, -30f, 30f);
                    }
                    break;
                }
            }
예제 #3
0
 void OnEnable()
 {
     _fig = new GLFigure();
 }
예제 #4
0
 void Awake()
 {
     _fig = new GLFigure();
 }