Esempio n. 1
0
    private void onAutoAnimUpdate(WMG_Series aSeries)
    {
        List <Vector2> newPositions = new List <Vector2>();
        List <int>     newWidths    = new List <int>();
        List <int>     newHeights   = new List <int>();

        for (int i = 0; i < aSeries.AfterPositions.Count; i++)
        {
            newPositions.Add(WMG_Util.RemapVec2(aSeries.autoAnimationTimeline, 0, 1, aSeries.OrigPositions[i], aSeries.AfterPositions[i]));
            newWidths.Add(Mathf.RoundToInt(WMG_Util.RemapFloat(aSeries.autoAnimationTimeline, 0, 1, aSeries.OrigWidths[i], aSeries.AfterWidths[i])));
            newHeights.Add(Mathf.RoundToInt(WMG_Util.RemapFloat(aSeries.autoAnimationTimeline, 0, 1, aSeries.OrigHeights[i], aSeries.AfterHeights[i])));
        }

        aSeries.UpdateVisuals(newPositions, newWidths, newHeights);
    }