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); }
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); }
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); }