/** Updates entity position and logic. */ public void update() { super.update(); this.xPos -= speed * Game.delta; if (this.xPos < ScreenHelper.widthNeg(this)) { this.setDead(); } }
public void onCollect(EntityPlayer paramEntityPlayer) { super.onCollect(paramEntityPlayer); paramEntityPlayer.addMoney(1); this.setDead(); }