mirror of
https://github.com/Relintai/gdnative_python.git
synced 2024-11-12 10:25:08 +01:00
29 lines
696 B
Python
29 lines
696 B
Python
from godot import exposed, export
|
|
|
|
from pynode import PyNode
|
|
|
|
|
|
@exposed
|
|
class PySubNode(PyNode):
|
|
_sub_ready_called = False
|
|
_overloaded_by_child_prop_value = None
|
|
|
|
def _ready(self):
|
|
super()._ready()
|
|
self._sub_ready_called = True
|
|
|
|
def is_sub_ready_called(self):
|
|
return self._sub_ready_called
|
|
|
|
def overloaded_by_child_meth(self, attr):
|
|
return f"sub:{attr}"
|
|
|
|
@export(str, default="default")
|
|
@property
|
|
def overloaded_by_child_prop(self):
|
|
return self._overloaded_by_child_prop_value
|
|
|
|
@overloaded_by_child_prop.setter
|
|
def overloaded_by_child_prop(self, value):
|
|
self._overloaded_by_child_prop_value = f"sub:{value}"
|