25 lines
		
	
	
		
			929 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			929 B
		
	
	
	
		
			Python
		
	
	
	
	
	
from lnx.logicnode.lnx_nodes import *
 | 
						|
 | 
						|
class OnContactArrayNode(LnxLogicTreeNode):
 | 
						|
    """Activates the output when the given rigid body make contact with other given rigid bodies."""
 | 
						|
    bl_idname = 'LNOnContactArrayNode'
 | 
						|
    bl_label = 'On Contact Array'
 | 
						|
    lnx_section = 'contact'
 | 
						|
    lnx_version = 1
 | 
						|
 | 
						|
    property0: HaxeEnumProperty(
 | 
						|
        'property0',
 | 
						|
        items = [('begin', 'Begin', 'The contact between the rigid bodies begins'),
 | 
						|
                 ('overlap', 'Overlap', 'The contact between the rigid bodies is happening'),
 | 
						|
                 ('end', 'End', 'The contact between the rigid bodies ends')],
 | 
						|
        name='', default='begin')
 | 
						|
 | 
						|
    def lnx_init(self, context):
 | 
						|
        self.add_input('LnxNodeSocketObject', 'RB')
 | 
						|
        self.add_input('LnxNodeSocketArray', 'RBs')
 | 
						|
 | 
						|
        self.add_output('LnxNodeSocketAction', 'Out')
 | 
						|
 | 
						|
    def draw_buttons(self, context, layout):
 | 
						|
        layout.prop(self, 'property0')
 |