17 lines
		
	
	
		
			561 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			561 B
		
	
	
	
		
			Python
		
	
	
	
	
	
from lnx.logicnode.lnx_nodes import *
 | 
						|
 | 
						|
class OnTimerNode(LnxLogicTreeNode):
 | 
						|
    """Activates the output when a given time elapsed (optionally repeating the timer).
 | 
						|
 | 
						|
    @input Duration: the time in seconds after which to activate the output
 | 
						|
    @input Repeat: whether to repeat the timer"""
 | 
						|
    bl_idname = 'LNOnTimerNode'
 | 
						|
    bl_label = 'On Timer'
 | 
						|
    lnx_version = 1
 | 
						|
 | 
						|
    def lnx_init(self, context):
 | 
						|
        self.add_input('LnxFloatSocket', 'Duration')
 | 
						|
        self.add_input('LnxBoolSocket', 'Repeat')
 | 
						|
 | 
						|
        self.add_output('LnxNodeSocketAction', 'Out')
 |