Example #1
0
  /** Updates entity position and logic. */
  public void update() {
    super.update();
    this.xPos -= speed * Game.delta;

    if (this.xPos < ScreenHelper.widthNeg(this)) {
      this.setDead();
    }
  }
Example #2
0
 public void onCollect(EntityPlayer paramEntityPlayer) {
   super.onCollect(paramEntityPlayer);
   paramEntityPlayer.addMoney(1);
   this.setDead();
 }