Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // -----JS CODE-----
- //@input SceneObject face1
- //@input SceneObject face2
- //@input SceneObject face3
- var tap_count = 0;
- function tap_check() {
- if (tap_count === 0) {
- script.face1.enabled = true;
- script.face2.enabled = false;
- script.face3.enabled = false;
- global.logToScreen(tap_count.toString());
- global.logToScreen("lucia_mask");
- }
- else if (tap_count === 1) {
- script.face1.enabled = false;
- script.face2.enabled = true;
- script.face3.enabled = false;
- global.logToScreen(tap_count.toString());
- global.logToScreen("mac_mask");
- }
- else if (tap_count === 2) {
- script.face1.enabled = false;
- script.face2.enabled = false;
- script.face3.enabled = true;
- global.logToScreen(tap_count.toString());
- global.logToScreen("dylan_mask");
- }
- else {
- tap_count = 0;
- }
- }
- function onTapped(eventData)
- {
- //global.logToScreen("Tap Position: (" + eventData.getTapPosition().x + ", " + eventData.getTapPosition().y + ")");
- tap_count = tap_count + 1;
- global.logToScreen("tap")
- global.logToScreen(tap_count.toString());
- tap_check();
- }
- var event = script.createEvent("TapEvent");
- event.bind(onTapped);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement