Advertisement
pastetumlum

Untitled

Jul 17th, 2018
275
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.61 KB | None | 0 0
  1.     public void xulyDiChuyen() {
  2.         mainView.getInGameFrame().addKeyListener(new KeyAdapter() {
  3.             private void move(Direction direction) {
  4.  
  5.                 if (!mainModel.onTile(MapElement.ROCK, direction)) {
  6.                     if (mainModel.onTile(MapElement.QUESTION, direction)) {
  7.                         // khi đi lên ô câu hỏi, thực thi xulyGapCauHoi();
  8.                         xulyGapCauHoi();
  9.                     }
  10.                     mainModel.moveBear(direction);            
  11.                 }
  12.             }
  13.     }
  14.     public void xulyGapCauHoi() {
  15.         mainModel.updateQuestionIndex();
  16.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement