public void update( int x, int y, boolean b0, boolean b1, boolean b2, boolean onScreen, boolean[] keysDown, String typed) { b0Clicked = !this.b0 && b0; b1Clicked = !this.b1 && b1; b2Clicked = !this.b2 && b2; b0Released = this.b0 && !b0; b1Released = this.b1 && !b1; b2Released = this.b2 && !b2; this.x = x; this.y = y; this.b0 = b0; this.b1 = b1; this.b2 = b2; this.onScreen = onScreen; this.typed = ""; for (Key key : keys) { key.tick(keysDown); } }
public void tick() { for (Key key : all) key.tick(); }