コード例 #1
0
    void Start()
    {
        red.setColor(Color.red);
        blue.setColor(Color.blue);

        brush.GetPhysicsShape(0, Spoints);

        redCollider.addFilter(filter.points, filter.GetTotalPointCount(), filter.transform.lossyScale, filter.transform.position);
        blueCollider.addFilter(filter.points, filter.GetTotalPointCount(), filter.transform.lossyScale, filter.transform.position);
    }
コード例 #2
0
    void Start()
    {
        red.setColor(Color.red);
        blue.setColor(Color.blue);

        brush.GetPhysicsShape(0, Spoints);

        for (int i = 0; i < filter.pathCount; i++)
        {
            Vector2[] points = new Vector2[filter.GetPathPointCount(i)];
            filter.GetPath(i, points);

            redCollider.addFilter(points);
            blueCollider.addFilter(points);
        }
    }