23 lines
745 B
Python
23 lines
745 B
Python
from arm.logicnode.arm_nodes import *
|
|
|
|
class OnSurfaceNode(ArmLogicTreeNode):
|
|
"""On surface node"""
|
|
bl_idname = 'LNOnSurfaceNode'
|
|
bl_label = 'On Surface'
|
|
arm_version = 1
|
|
property0: EnumProperty(
|
|
items = [('Touched', 'Touched', 'Touched'),
|
|
('Started', 'Started', 'Started'),
|
|
('Released', 'Released', 'Released'),
|
|
('Moved', 'Moved', 'Moved')],
|
|
name='', default='Touched')
|
|
|
|
def init(self, context):
|
|
super(OnSurfaceNode, self).init(context)
|
|
self.add_output('ArmNodeSocketAction', 'Out')
|
|
|
|
def draw_buttons(self, context, layout):
|
|
layout.prop(self, 'property0')
|
|
|
|
add_node(OnSurfaceNode, category=PKG_AS_CATEGORY, section='surface')
|