Пример #1
0
 public void createTouchDownAction() {
   ParallelAction whenParallelAction = ActionFactory.parallel();
   for (Script s : scriptList) {
     if (s instanceof WhenTouchDownScript) {
       SequenceAction sequence = createActionSequence(s);
       whenParallelAction.addAction(sequence);
     }
   }
   look.addAction(whenParallelAction);
 }
Пример #2
0
 public void createWhenScriptActionSequence(String action) {
   ParallelAction whenParallelAction = actionFactory.parallel();
   for (Script s : scriptList) {
     if (s instanceof WhenScript && (((WhenScript) s).getAction().equalsIgnoreCase(action))) {
       SequenceAction sequence = createActionSequence(s);
       whenParallelAction.addAction(sequence);
     }
   }
   look.setWhenParallelAction(whenParallelAction);
   look.addAction(whenParallelAction);
 }
Пример #3
0
 public void createWhenNfcScriptAction(String uid) {
   ParallelAction whenParallelAction = ActionFactory.parallel();
   for (Script s : scriptList) {
     if (s instanceof WhenNfcScript) {
       WhenNfcScript whenNfcScript = (WhenNfcScript) s;
       if (whenNfcScript.isMatchAll() || whenNfcScript.getNfcTag().getNfcTagUid().equals(uid)) {
         SequenceAction sequence = createActionSequence(s);
         whenParallelAction.addAction(sequence);
       }
     }
   }
   // TODO: quick fix for faulty behaviour - nfc action triggers again after touchevents
   // look.setWhenParallelAction(whenParallelAction);
   look.addAction(whenParallelAction);
 }