コード例 #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();
 }