fix: change hotspots Node to Node2D to allow for proper room visibility swapping

This commit is contained in:
Duncan Brown
2022-04-13 15:54:47 -04:00
committed by Julian Murgia
parent 4b3b96b688
commit b985c42e08
6 changed files with 222 additions and 232 deletions

View File

@@ -13,7 +13,7 @@
[ext_resource path="res://game/rooms/room07/elevator_door.png" type="Texture" id=12]
[ext_resource path="res://game/characters/mark/png/mark.png" type="Texture" id=13]
[sub_resource type="Animation" id=12]
[sub_resource type="Animation" id=1]
length = 0.001
tracks/0/type = "value"
tracks/0/path = NodePath(".:position")
@@ -216,7 +216,7 @@ tracks/18/keys = {
"values": [ false ]
}
[sub_resource type="Animation" id=14]
[sub_resource type="Animation" id=2]
resource_name = "lift_floor_1_to_2_no_player"
length = 5.5
tracks/0/type = "bezier"
@@ -302,7 +302,7 @@ tracks/7/keys = {
"values": [ false ]
}
[sub_resource type="Animation" id=18]
[sub_resource type="Animation" id=3]
resource_name = "lift_floor_1_to_2_with_player"
length = 5.5
tracks/0/type = "bezier"
@@ -388,7 +388,7 @@ tracks/7/keys = {
"values": [ true, false ]
}
[sub_resource type="Animation" id=15]
[sub_resource type="Animation" id=4]
resource_name = "lift_floor_2_to_1_no_player"
length = 5.5
tracks/0/type = "bezier"
@@ -474,7 +474,7 @@ tracks/7/keys = {
"values": [ false ]
}
[sub_resource type="Animation" id=19]
[sub_resource type="Animation" id=5]
resource_name = "lift_floor_2_to_1_with_player"
length = 5.5
tracks/0/type = "bezier"
@@ -560,17 +560,17 @@ tracks/7/keys = {
"values": [ true, false ]
}
[sub_resource type="NavigationPolygon" id=1]
[sub_resource type="NavigationPolygon" id=6]
vertices = PoolVector2Array( 2161.27, 3.52002, 2166.27, -45.48, 2237.27, 3.52002, 2237.27, 150.52, 6.26837, -11.48, 73.2684, -50.48, 76.2684, 11.52, 3.26837, 147.52, 127.268, -36.48, 1852.27, -39.48, 1954.27, -36.48, 1855.27, -76.48, 1954.27, -76.48, 2104.27, -36.48 )
polygons = [ PoolIntArray( 0, 1, 2, 3 ), PoolIntArray( 4, 5, 6, 7 ), PoolIntArray( 3, 7, 6, 8, 9, 10 ), PoolIntArray( 11, 12, 10, 9 ), PoolIntArray( 3, 10, 13, 0 ) ]
outlines = [ PoolVector2Array( 127.268, -36.48, 1852.27, -39.48, 1855.27, -76.48, 1954.27, -76.48, 1954.27, -36.48, 2104.27, -36.48, 2161.27, 3.52002, 2166.27, -45.48, 2237.27, 3.52002, 2237.27, 150.52, 3.26837, 147.52, 6.26837, -11.48, 73.2684, -50.48, 76.2684, 11.52 ) ]
[sub_resource type="NavigationPolygon" id=2]
[sub_resource type="NavigationPolygon" id=7]
vertices = PoolVector2Array( 2237, -827.26, 14, -822.26, 14, -932.26, 144, -1011.26, 1844, -1005.26, 2240, -926.26, 1844, -1020.26, 1968, -1022.26, 1974, -1005.26, 2126, -1008.26 )
polygons = [ PoolIntArray( 0, 1, 2, 3, 4, 5 ), PoolIntArray( 4, 6, 7, 8 ), PoolIntArray( 5, 4, 8 ), PoolIntArray( 5, 8, 9 ) ]
outlines = [ PoolVector2Array( 2237, -827.26, 2240, -926.26, 2126, -1008.26, 1974, -1005.26, 1968, -1022.26, 1844, -1020.26, 1844, -1005.26, 144, -1011.26, 14, -932.26, 14, -822.26 ) ]
[sub_resource type="Animation" id=9]
[sub_resource type="Animation" id=8]
length = 0.001
tracks/0/type = "value"
tracks/0/path = NodePath("AlarmCone:modulate")
@@ -585,7 +585,7 @@ tracks/0/keys = {
"values": [ Color( 1, 1, 1, 1 ) ]
}
[sub_resource type="Animation" id=10]
[sub_resource type="Animation" id=9]
resource_name = "camera_not_triggered"
length = 0.1
tracks/0/type = "value"
@@ -601,7 +601,7 @@ tracks/0/keys = {
"values": [ Color( 1, 1, 1, 1 ) ]
}
[sub_resource type="Animation" id=11]
[sub_resource type="Animation" id=10]
resource_name = "camera_triggered"
length = 0.1
tracks/0/type = "value"
@@ -617,7 +617,7 @@ tracks/0/keys = {
"values": [ Color( 1, 0, 0, 1 ) ]
}
[sub_resource type="Animation" id=20]
[sub_resource type="Animation" id=11]
length = 0.001
tracks/0/type = "value"
tracks/0/path = NodePath("AlarmCone:modulate")
@@ -632,7 +632,7 @@ tracks/0/keys = {
"values": [ Color( 1, 1, 1, 1 ) ]
}
[sub_resource type="Animation" id=21]
[sub_resource type="Animation" id=12]
resource_name = "camera_not_triggered"
length = 0.1
tracks/0/type = "value"
@@ -648,7 +648,7 @@ tracks/0/keys = {
"values": [ Color( 1, 1, 1, 1 ) ]
}
[sub_resource type="Animation" id=22]
[sub_resource type="Animation" id=13]
resource_name = "camera_triggered"
length = 0.1
tracks/0/type = "value"
@@ -715,11 +715,11 @@ texture = ExtResource( 12 )
[node name="AnimationPlayer" type="AnimationPlayer" parent="lift"]
root_node = NodePath("../lift")
anims/RESET = SubResource( 12 )
anims/lift_floor_1_to_2_no_player = SubResource( 14 )
anims/lift_floor_1_to_2_with_player = SubResource( 18 )
anims/lift_floor_2_to_1_no_player = SubResource( 15 )
anims/lift_floor_2_to_1_with_player = SubResource( 19 )
anims/RESET = SubResource( 1 )
anims/lift_floor_1_to_2_no_player = SubResource( 2 )
anims/lift_floor_1_to_2_with_player = SubResource( 3 )
anims/lift_floor_2_to_1_no_player = SubResource( 4 )
anims/lift_floor_2_to_1_with_player = SubResource( 5 )
[node name="door_1_floor_2" type="Sprite" parent="lift"]
position = Vector2( 1510, 251 )
@@ -754,8 +754,8 @@ margin_left = 7.0
margin_top = 3.0
margin_right = 89.0
margin_bottom = 24.0
custom_colors/font_color = Color( 0, 0, 0, 1 )
custom_fonts/font = ExtResource( 5 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
text = "ROOM 7 upper floor"
__meta__ = {
"_edit_use_anchors_": false
@@ -766,8 +766,8 @@ margin_left = 10.0
margin_top = 628.0
margin_right = 182.0
margin_bottom = 649.0
custom_colors/font_color = Color( 0, 0, 0, 1 )
custom_fonts/font = ExtResource( 5 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
text = "ROOM 7 lower floor"
__meta__ = {
"_edit_use_anchors_": false
@@ -778,8 +778,8 @@ margin_left = 275.0
margin_top = 681.0
margin_right = 989.0
margin_bottom = 885.0
custom_colors/font_color = Color( 0, 0, 0, 1 )
custom_fonts/font = ExtResource( 5 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
text = "camera_push : This will point the camera at a specific location.
camera_shift : Moves the camera by an amount of pixels in x and y relative to the current location
camera_zoom : Adjust the zoom level relative to the initial camera zoom
@@ -797,17 +797,17 @@ script = ExtResource( 1 )
[node name="lower_platform" type="NavigationPolygonInstance" parent="walkable_area"]
position = Vector2( 7.73163, 1138.48 )
navpoly = SubResource( 1 )
navpoly = SubResource( 6 )
__meta__ = {
"_editor_description_": ""
}
[node name="upper_platform" type="NavigationPolygonInstance" parent="walkable_area"]
position = Vector2( 0, 1403.26 )
navpoly = SubResource( 2 )
navpoly = SubResource( 7 )
enabled = false
[node name="Hotspots" type="Node" parent="."]
[node name="Hotspots" type="Node2D" parent="."]
[node name="l_exit" type="Area2D" parent="Hotspots"]
pause_mode = 1
@@ -1034,9 +1034,9 @@ position = Vector2( 1093, 1055 )
texture = ExtResource( 10 )
[node name="AnimationPlayer" type="AnimationPlayer" parent="Hotspots/alarm_cone_floor1"]
anims/RESET = SubResource( 9 )
anims/camera_not_triggered = SubResource( 10 )
anims/camera_triggered = SubResource( 11 )
anims/RESET = SubResource( 8 )
anims/camera_not_triggered = SubResource( 9 )
anims/camera_triggered = SubResource( 10 )
[node name="Label" type="Label" parent="Hotspots/alarm_cone_floor1"]
margin_left = 999.0
@@ -1071,9 +1071,9 @@ position = Vector2( 1093, 346 )
texture = ExtResource( 10 )
[node name="AnimationPlayer" type="AnimationPlayer" parent="Hotspots/alarm_cone_floor2"]
anims/RESET = SubResource( 20 )
anims/camera_not_triggered = SubResource( 21 )
anims/camera_triggered = SubResource( 22 )
anims/RESET = SubResource( 11 )
anims/camera_not_triggered = SubResource( 12 )
anims/camera_triggered = SubResource( 13 )
[node name="Label" type="Label" parent="Hotspots/alarm_cone_floor2"]
margin_left = 982.0