Pretty sure that's the purpose of the extends
keyword as you can create a custom class using Reference
, Object
, Node
as the base then have every other node in your game extend from that.
Example Base
class_name Base extends Node
var foo_list = []
func rpc_list(list, function_name):
for id in list:
rpc_id(id, function_name)
Example other
class_name Ball extends Base
func roll():
do_roll()
Example extra
class_name Glove extends Ball
func _ready():
rpc_list(foo_list, roll)
Other than that to do exactly what you want would require building your own version of Godot from the source