Beispiel #1
0
    public WTPolygonSprite(WTPolygonData polygonData)
    {
        _element      = Futile.atlasManager.GetElementWithName("Futile_White");
        _isAlphaDirty = true;

        UpdateWithData(polygonData);
    }
Beispiel #2
0
    public WTPolygonSprite(WTPolygonData polygonData)
    {
        _element = Futile.atlasManager.GetElementWithName("Futile_White");
        _isAlphaDirty = true;

        UpdateWithData(polygonData);
    }
Beispiel #3
0
    // Call this method if you want to change the points of the polygon after it already exists.
    public void UpdateWithData(WTPolygonData newData)
    {
        this.polygonData = newData;

        if (polygonData != null)
        {
            RefreshVertices();

            _triangleCount = this.polygonData.polygonTriangles.Length / 3;

            Init(FFacetType.Triangle, _element, _triangleCount);

            _isMatrixDirty         = true;
            _isAlphaDirty          = true;
            _areLocalVerticesDirty = true;

            Redraw(true, false);
        }
    }
Beispiel #4
0
    // Call this method if you want to change the points of the polygon after it already exists.
    public void UpdateWithData(WTPolygonData newData)
    {
        this.polygonData = newData;

        if (polygonData != null) {
            RefreshVertices();

            _triangleCount = this.polygonData.polygonTriangles.Length / 3;

            Init(FFacetType.Triangle, _element, _triangleCount);

            _isMatrixDirty = true;
            _isAlphaDirty = true;
            _areLocalVerticesDirty = true;

            Redraw(true, false);
        }
    }