Search in sources :

Example 1 with LinePath

use of master.flame.danmaku.danmaku.model.SpecialDanmaku.LinePath in project ABPlayer by winkstu.

the class DanmakuFactory method updateSpecialDanmakusDate.

private static void updateSpecialDanmakusDate(float scaleX, float scaleY) {
    IDanmakus list = sSpecialDanmakus;
    IDanmakuIterator it = list.iterator();
    while (it.hasNext()) {
        SpecialDanmaku speicalDanmaku = (SpecialDanmaku) it.next();
        fillTranslationData(speicalDanmaku, speicalDanmaku.beginX, speicalDanmaku.beginY, speicalDanmaku.endX, speicalDanmaku.endY, speicalDanmaku.translationDuration, speicalDanmaku.translationStartDelay, scaleX, scaleY);
        LinePath[] linePaths = speicalDanmaku.linePaths;
        if (linePaths != null && linePaths.length > 0) {
            int length = linePaths.length;
            float[][] points = new float[length + 1][2];
            for (int j = 0; j < length; j++) {
                points[j] = linePaths[j].getBeginPoint();
                points[j + 1] = linePaths[j].getEndPoint();
            }
            fillLinePathData(speicalDanmaku, points, scaleX, scaleY);
        }
    }
}
Also used : IDanmakuIterator(master.flame.danmaku.danmaku.model.IDanmakuIterator) LinePath(master.flame.danmaku.danmaku.model.SpecialDanmaku.LinePath) SpecialDanmaku(master.flame.danmaku.danmaku.model.SpecialDanmaku) IDanmakus(master.flame.danmaku.danmaku.model.IDanmakus)

Aggregations

IDanmakuIterator (master.flame.danmaku.danmaku.model.IDanmakuIterator)1 IDanmakus (master.flame.danmaku.danmaku.model.IDanmakus)1 SpecialDanmaku (master.flame.danmaku.danmaku.model.SpecialDanmaku)1 LinePath (master.flame.danmaku.danmaku.model.SpecialDanmaku.LinePath)1