예제 #1
0
  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);
    }
  }
예제 #2
0
파일: Keys.java 프로젝트: Tipaa/Snatch
 public void tick() {
   for (Key key : all) key.tick();
 }
예제 #3
0
 public void tick() {
   for (Key key : keys) {
     key.tick();
   }
 }