2023-11-22 02:44:07 +02:00
|
|
|
extends Resource
|
2024-03-17 01:14:31 +02:00
|
|
|
## Base class for all events
|
2023-11-22 02:44:07 +02:00
|
|
|
class_name Event
|
|
|
|
|
2024-03-17 01:14:31 +02:00
|
|
|
## Merges the current event with another event. This is used in the EventSystem internally.
|
2023-11-22 02:44:07 +02:00
|
|
|
func merge(event: Event):
|
|
|
|
assert(self.is_class(event.get_class()), "Can only merge events of the same type.")
|
|
|
|
|
|
|
|
for prop in event.get_property_list():
|
|
|
|
if prop.name in self:
|
|
|
|
self.set(prop.name, event.get(prop.name))
|