public static void fillLinePathData( BaseDanmaku item, float[][] points, float scaleX, float scaleY) { if (item.getType() != BaseDanmaku.TYPE_SPECIAL || points.length == 0 || points[0].length != 2) return; for (int i = 0; i < points.length; i++) { points[i][0] *= scaleX; points[i][1] *= scaleY; } ((SpecialDanmaku) item).setLinePathData(points); }
/** * Initial translation data of the special danmaku * * @param item * @param dispWidth * @param dispHeight * @param beginX * @param beginY * @param endX * @param endY * @param translationDuration * @param translationStartDelay */ public static void fillTranslationData( BaseDanmaku item, float beginX, float beginY, float endX, float endY, long translationDuration, long translationStartDelay, float scaleX, float scaleY) { if (item.getType() != BaseDanmaku.TYPE_SPECIAL) return; ((SpecialDanmaku) item) .setTranslationData( beginX * scaleX, beginY * scaleY, endX * scaleX, endY * scaleY, translationDuration, translationStartDelay); updateSpecicalDanmakuDuration(item); }
/** * Initial alpha data of the special danmaku * * @param item * @param beginAlpha * @param endAlpha * @param alphaDuraion */ public static void fillAlphaData( BaseDanmaku item, int beginAlpha, int endAlpha, long alphaDuraion) { if (item.getType() != BaseDanmaku.TYPE_SPECIAL) return; ((SpecialDanmaku) item).setAlphaData(beginAlpha, endAlpha, alphaDuraion); updateSpecicalDanmakuDuration(item); }