Пример #1
0
 @Override
 public void onMinuteChanged(BaseTime time) {
   int rm = time.get(Calendar.MINUTE);
   int rt = time.getSeconds();
   //		System.out.println("분마다 잘 동작 하는지.." + rm);
   //		System.out.println("초는 잘 읽어 오는지.." + rt);
   if (rm % 10 != 0) return;
   for (int i = 0; i < _castle.length; i++) {
     int wbt = _castle[i].getWarBaseTime() + 7200;
     if (_castle[i].getWarBaseTime() != 0) {
       if (wbt < rt) {
         _castle[i].setWarBaseTime(0);
         CastleTable.getInstance().updateCastle(_castle[i]);
       }
     }
   }
 }
Пример #2
0
 private void some() {
   for (int i = 0; i < _castle.length; i++) {
     _castle[i] = CastleTable.getInstance().getCastleTable(i + 1);
     _warBaseTime[i] = _castle[i].getWarBaseTime();
   }
 }