Event flags implementation (#382)

* Added event flags
* Added transition ESC command
* Also edited .gitignore to ignore .translation files
* docs: Automatic update of API docs

Co-authored-by: StraToN <StraToN@users.noreply.github.com>
This commit is contained in:
Julian Murgia
2021-09-07 09:13:09 +02:00
committed by GitHub
parent 903422960a
commit b4bf5b82d6
51 changed files with 1071 additions and 305 deletions

View File

@@ -21,3 +21,10 @@ points = PoolVector2Array( 6.61201, 704.409, 6.61203, 389.558, 87.755, 339.775,
__meta__ = {
"_editor_description_": ""
}
[node name="r_door" type="Line2D" parent="."]
position = Vector2( 0, -267.828 )
points = PoolVector2Array( 1175.07, 620.086, 1171.24, 311.267, 1274.8, 356.87, 1278.31, 672.412, 1188.64, 624.843 )
__meta__ = {
"_editor_description_": ""
}

View File

@@ -1,2 +1,3 @@
:exit_scene
set_sound_state bg_sound res://game/sfx/sounds/doorOpen_2.ogg false
change_scene "res://game/rooms/room11/room11.tscn"

View File

@@ -1,130 +1,25 @@
[gd_scene load_steps=4 format=2]
[gd_scene load_steps=3 format=2]
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_item.gd" type="Script" id=1]
[sub_resource type="Animation" id=1]
resource_name = "r_door_close"
tracks/0/type = "value"
tracks/0/path = NodePath("r_door_closed:visible")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ true ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("r_door_opened:visible")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ false ]
}
tracks/2/type = "value"
tracks/2/path = NodePath(".:is_exit")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ false ]
}
tracks/3/type = "value"
tracks/3/path = NodePath(".:default_action")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ "look" ]
}
[sub_resource type="Animation" id=2]
resource_name = "r_door_open"
length = 0.3
tracks/0/type = "value"
tracks/0/path = NodePath("r_door_closed:visible")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ false ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("r_door_opened:visible")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ true ]
}
tracks/2/type = "value"
tracks/2/path = NodePath(".:is_exit")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ true ]
}
tracks/3/type = "value"
tracks/3/path = NodePath(".:default_action")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ "walk" ]
}
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_location.gd" type="Script" id=2]
[node name="r_door" type="Area2D"]
pause_mode = 1
script = ExtResource( 1 )
global_id = "r9_door"
esc_script = "res://game/rooms/room9/esc/r9_door.esc"
tooltip_name = "Door"
default_action = "look"
__meta__ = {
"_editor_description_": ""
}
global_id = "r1_r_exit"
esc_script = "res://game/rooms/room01/esc/right_exit.esc"
is_exit = true
tooltip_name = "Exit"
default_action = "walk"
dialog_color = Color( 1, 1, 1, 1 )
[node name="r_door_closed" type="Polygon2D" parent="."]
color = Color( 0.482353, 0.568627, 1, 1 )
polygon = PoolVector2Array( 1172.3, 44.8186, 1172.3, 348.012, 1273.9, 401.983, 1277.07, 89.2657 )
[node name="r_door_opened" type="Polygon2D" parent="."]
visible = false
color = Color( 0.482353, 0.568627, 1, 1 )
polygon = PoolVector2Array( 1172.3, 44.8186, 1172.3, 348.012, 1029.82, 349.887, 1025.19, 42.1269 )
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
anims/r_door_close = SubResource( 1 )
anims/r_door_open = SubResource( 2 )
animations = null
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
polygon = PoolVector2Array( 1169.35, 41.7644, 1168.09, 347.925, 1275.18, 407.141, 1278.96, 88.3814 )
polygon = PoolVector2Array( 1177.94, 348.61, 1175.95, 45.3759, 1276.06, 92.0953, 1277.95, 399.407 )
[node name="Position2D" type="Position2D" parent="."]
position = Vector2( 1225.47, 353.99 )
script = ExtResource( 2 )

View File

@@ -49,6 +49,7 @@ __meta__ = {
[node name="Hotspots" type="Node2D" parent="."]
[node name="l_door" type="Area2D" parent="Hotspots"]
pause_mode = 1
script = ExtResource( 7 )
global_id = "r10_l_exit"
esc_script = "res://game/rooms/room10/esc/left_exit.esc"
@@ -66,14 +67,15 @@ position = Vector2( 37.4521, 392.045 )
script = ExtResource( 5 )
[node name="r_door" parent="Hotspots" instance=ExtResource( 9 )]
global_id = "r10_r_exit"
esc_script = "res://game/rooms/room10/esc/right_exit.esc"
animations = null
[node name="Position2D" type="Position2D" parent="Hotspots/r_door"]
position = Vector2( 1198.65, 391.058 )
script = ExtResource( 5 )
[node name="button_stop_bg_music" parent="Hotspots" instance=ExtResource( 8 )]
pause_mode = 1
position = Vector2( 243.165, 154.97 )
global_id = "r10_btn_stop_bg_music"
esc_script = "res://game/rooms/room10/esc/button_stop_bg_music.esc"
@@ -95,6 +97,7 @@ __meta__ = {
}
[node name="button_play_bg_music" parent="Hotspots" instance=ExtResource( 8 )]
pause_mode = 1
position = Vector2( 377.976, 154.97 )
global_id = "r10_btn_play_bg_music"
esc_script = "res://game/rooms/room10/esc/button_play_bg_music.esc"
@@ -116,6 +119,7 @@ __meta__ = {
}
[node name="button_play_sound" parent="Hotspots" instance=ExtResource( 8 )]
pause_mode = 1
position = Vector2( 646.339, 154.97 )
global_id = "r10_btn_play_snd"
esc_script = "res://game/rooms/room10/esc/button_play_snd.esc"
@@ -137,6 +141,7 @@ __meta__ = {
}
[node name="button_accept_input" parent="Hotspots" instance=ExtResource( 8 )]
pause_mode = 1
position = Vector2( 823.113, 155.354 )
global_id = "test_accept_input"
esc_script = "res://game/rooms/room10/esc/button_accept_input_test.esc"
@@ -161,6 +166,7 @@ script = ExtResource( 5 )
global_id = "accept_input_location"
[node name="button_slide" parent="Hotspots" instance=ExtResource( 8 )]
pause_mode = 1
position = Vector2( 939.497, 154.301 )
global_id = "button_slide"
esc_script = "res://game/rooms/room10/esc/button_slide.esc"
@@ -184,6 +190,7 @@ script = ExtResource( 5 )
global_id = "slide_location"
[node name="button_turn_to" parent="Hotspots" instance=ExtResource( 8 )]
pause_mode = 1
position = Vector2( 1041.66, 152.721 )
global_id = "button_turn_to"
esc_script = "res://game/rooms/room10/esc/button_turn_to.esc"