Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
 /**
  * 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);
 }
Ejemplo n.º 3
0
 /**
  * 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);
 }