mirror of
https://github.com/Relintai/gdnative_python.git
synced 2024-11-14 10:27:22 +01:00
25 lines
482 B
Python
25 lines
482 B
Python
from pandemonium import exposed, export, Node2D
|
|
|
|
|
|
@exposed
|
|
class MyExportedCls(Node2D):
|
|
initialized = False
|
|
_python_prop = None
|
|
|
|
def _ready(self):
|
|
self.initialized = True
|
|
|
|
def python_method(self, attr):
|
|
return attr
|
|
|
|
python_prop_static = export(str)
|
|
|
|
@export(int, default=42)
|
|
@property
|
|
def python_prop(self):
|
|
return self._python_prop
|
|
|
|
@python_prop.setter
|
|
def python_prop(self, value):
|
|
self._python_prop = value
|