예제 #1
0
 public Bullet(
     final Color color,
     final VectorI pixelCount,
     final VectorF pixelOffsetSize,
     final float maxLifetime) {
   this.color = color;
   pixels = new ColorPixelModel(pixelCount, pixelOffsetSize);
   states = new PixelStateModel(pixelCount);
   states.setAll(PixelState.UNDAMAGED);
   pixels.getColors().setAll(Colorizer.colorize(200, color).makeCssColor());
   tracker = new PixelStatePointCountTracker(PixelState.UNDAMAGED);
   tracker.track(states);
   maxDamage = pixelCount.getArea();
 }
예제 #2
0
 @Override
 public VectorI getPixelCount() {
   return pixels.getPixelCount();
 }
예제 #3
0
 @Override
 public VectorF getHalfSize() {
   return pixels.getHalfSize();
 }
예제 #4
0
 @Override
 public VectorF getPixelOffsetSize() {
   return pixels.getPixelOffsetSize();
 }