add event bus
This commit is contained in:
8
godot/Event.gdns
Normal file
8
godot/Event.gdns
Normal file
@@ -0,0 +1,8 @@
|
||||
[gd_resource type="NativeScript" load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://gdnative/alai.tres" type="GDNativeLibrary" id=1]
|
||||
|
||||
[resource]
|
||||
resource_name = "Event"
|
||||
class_name = "Event"
|
||||
library = ExtResource( 1 )
|
@@ -50,6 +50,10 @@ var game: Dictionary = {}
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
Event.connect("object_created", self, "_object_created")
|
||||
Event.connect("object_updated", self, "_object_updated")
|
||||
Event.connect("object_removed", self, "_object_removed")
|
||||
|
||||
game_version = get_parent().game_version
|
||||
|
||||
player["rut"] = ""
|
||||
|
@@ -6,6 +6,7 @@
|
||||
[node name="Monitor" type="Node"]
|
||||
pause_mode = 2
|
||||
script = ExtResource( 1 )
|
||||
monitor_enabled = true
|
||||
|
||||
[node name="MonitorGUI" parent="." instance=ExtResource( 3 )]
|
||||
visible = false
|
||||
|
@@ -15,6 +15,10 @@ config/description="This game is for testing an Artificial Intelligence."
|
||||
run/main_scene="res://Main.tscn"
|
||||
config/icon="res://icon.png"
|
||||
|
||||
[autoload]
|
||||
|
||||
Event="*res://Event.gdns"
|
||||
|
||||
[display]
|
||||
|
||||
window/size/width=512
|
||||
|
Reference in New Issue
Block a user