コード例 #1
0
  protected void renderCarrying(Screen screen, int yOffs) {
    if (carrying == null) return;

    carrying.yOffs -= yOffs;
    carrying.render(screen);
    carrying.yOffs += yOffs;
  }
コード例 #2
0
 public void drop() {
   carrying.removed = false;
   carrying.freezeTime = 10;
   carrying.justDroppedTicks = 80;
   carrying.setPos(pos);
   level.addEntity(carrying);
   carrying.onDrop();
   carrying = null;
 }
コード例 #3
0
 public void pickup(Building b) {
   if (b.health > 0) {
     level.removeEntity(b);
     carrying = b;
     carrying.onPickup(this);
   }
 }