Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor() {
super();
this.vibrator = new Vibrate();
// Has vibrator
this.hasVibrator = 'Has vibrator?: ' + this.vibrator.hasVibrator();
}
getVibrator() {
if (!vibrator) {
vibrator = new Vibrate();
}
return vibrator;
},
completeLevel(level, function(level) {
vibrator.vibration(2000);
Dialogs.confirm({ title: 'W i n n e r', message: 'You solved the puzzle in ' + moves + ' moves!', okButtonText: 'Ok'}).then(function() {
frame.topmost().navigate({
moduleName: "view/high-score/add-high-score/add-high-score",
context: myContext,
animated: false
});
});
}, frame);
}
completeLevel(level, function(level) {
vibrator.vibration(2000);
Dialogs.confirm({ title: 'W i n n e r', message: 'You solved the puzzle in ' + moves + ' moves!', okButtonText: 'Ok' }).then(function() {
frame.topmost().navigate(nextScreen);
});
}, frame);
}
completeLevel(level, function(level) {
vibrator.vibration(2000);
Dialogs.confirm({ title: 'W i n n e r', message: 'You solved the puzzle in ' + moves + ' moves!', okButtonText: 'Ok'}).then(function() {
frame.topmost().navigate({
moduleName: "view/high-score/add-high-score/add-high-score",
context: myContext,
animated: false
});
});
}, frame);
}