2020-10-08 12:20:54 +02:00
|
|
|
from arm.logicnode.arm_nodes import *
|
2020-09-18 07:37:44 +02:00
|
|
|
|
|
|
|
# Class OnTapScreen
|
|
|
|
class OnTapScreen(ArmLogicTreeNode):
|
2020-11-17 16:01:15 +01:00
|
|
|
"""Activates the output on tap screen event.
|
|
|
|
|
|
|
|
@input Duration: touching time
|
|
|
|
@input Interval: interval between taps
|
2020-11-17 18:46:14 +01:00
|
|
|
@input Repeat: repetitions amount to validate
|
2020-11-17 16:01:15 +01:00
|
|
|
|
|
|
|
@output Done: the sequence success
|
|
|
|
@output Fail: the the sequence failure
|
|
|
|
@output Tap Number: number of the last tap
|
|
|
|
@output Coords: the coordinates of the last tap
|
|
|
|
"""
|
2020-09-18 07:37:44 +02:00
|
|
|
bl_idname = 'LNOnTapScreen'
|
|
|
|
bl_label = 'On Tap Screen'
|
2020-10-27 19:44:37 +01:00
|
|
|
arm_section = 'Input'
|
2020-09-18 07:37:44 +02:00
|
|
|
arm_version = 1
|
|
|
|
|
2020-09-28 15:58:41 +02:00
|
|
|
def init(self, context):
|
|
|
|
super(OnTapScreen, self).init(context)
|
2020-09-18 07:37:44 +02:00
|
|
|
self.add_input('NodeSocketFloat', 'Duration')
|
|
|
|
self.inputs[-1].default_value = 0.3
|
|
|
|
self.add_input('NodeSocketFloat', 'Interval')
|
|
|
|
self.inputs[-1].default_value = 0.0
|
|
|
|
self.add_input('NodeSocketInt', 'Repeat')
|
|
|
|
self.inputs[-1].default_value = 2
|
2020-11-17 16:01:15 +01:00
|
|
|
|
2020-09-18 07:37:44 +02:00
|
|
|
self.add_output('ArmNodeSocketAction', 'Done')
|
|
|
|
self.add_output('ArmNodeSocketAction', 'Fail')
|
|
|
|
self.add_output('ArmNodeSocketAction', 'Tap')
|
|
|
|
self.add_output('NodeSocketInt', 'Tap Number')
|
|
|
|
self.add_output('NodeSocketVector', 'Coords')
|