示例#1
0
 @Override
 public void resizeBoundingBox(boolean flag) {
   EntitySize es = this.getClass().getAnnotation(EntitySize.class);
   if (es != null) {
     this.setSize(flag ? (es.width() / 2) : es.width(), flag ? (es.height() / 2) : es.height());
   }
 }
示例#2
0
 protected void setSize() {
   EntitySize es = this.getClass().getAnnotation(EntitySize.class);
   if (es != null) {
     this.setSize(es.width(), es.height());
   }
 }