コード例 #1
0
 /**
  * API method to add custom default hitboxes.
  *
  * @param entityClass The entity class to add the custom default for (also applies to classes
  *     extending this one)
  * @return The added default hitbox object
  */
 public static HeadHitboxDefault add(
     Class entityClass,
     float scale,
     float childScale,
     float[] size,
     float[] offset,
     float headDamage,
     float bodyDamage,
     float headMultiplier,
     float bodyMultiplier) {
   HeadHitboxDefault hitbox =
       new HeadHitboxDefault(
           scale,
           childScale,
           size,
           offset,
           headDamage,
           bodyDamage,
           headMultiplier,
           bodyMultiplier);
   hitbox.entityClass = entityClass;
   HeadHitboxDefault.DEFAULT_HEAD_HITBOXES.add(hitbox);
   return hitbox;
 }
コード例 #2
0
 public static HeadHitboxDefault add(Class entityClass, HeadHitboxDefault hitbox) {
   hitbox.entityClass = entityClass;
   HeadHitboxDefault.DEFAULT_HEAD_HITBOXES.add(hitbox);
   return hitbox;
 }