Deleted ESCHotspot (use ESCItem instead)
Moved duplicated movement code from ESCPlayer and ESCItem/ESCHotspot to its own script. Added talking animations management. Fixed bug: character was turning to last_direction after talking, if coming from another direction than speaking direction. Continued removing unfree stuff.
This commit is contained in:
@@ -45,6 +45,5 @@ visible = false
|
||||
polygon = PoolVector2Array( 343.993, 396.767, 323.298, 415.689, 344.585, 438.158, 365.872, 417.463 )
|
||||
|
||||
[node name="bridge" parent="." instance=ExtResource( 2 )]
|
||||
player_orients_on_arrival = false
|
||||
|
||||
[editable path="bridge"]
|
||||
|
||||
@@ -32,11 +32,15 @@ tracks/0/keys = {
|
||||
"values": [ Vector2( 1.417, -160.142 ), Vector2( 0, 0 ) ]
|
||||
}
|
||||
|
||||
[node name="bridge" type="Sprite"]
|
||||
[node name="bridge" type="Area2D"]
|
||||
script = ExtResource( 1 )
|
||||
global_id = "r2_bridge"
|
||||
is_interactive = false
|
||||
player_orients_on_arrival = false
|
||||
dialog_color = Color( 1, 1, 1, 1 )
|
||||
interact_positions = {
|
||||
"default": Vector2( 0, 0 )
|
||||
}
|
||||
|
||||
[node name="bridge_lines" type="Line2D" parent="."]
|
||||
position = Vector2( -2.36194, -105.8 )
|
||||
@@ -46,7 +50,5 @@ points = PoolVector2Array( 496.624, 640.806, 823.362, 644.635, 856.546, 776.097,
|
||||
anims/bridge_close = SubResource( 1 )
|
||||
anims/bridge_open = SubResource( 2 )
|
||||
|
||||
[node name="area" type="Area2D" parent="."]
|
||||
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="area"]
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
|
||||
polygon = PoolVector2Array( 493.501, 532.894, 463.501, 670.894, 861.501, 670.894, 823.501, 530.894 )
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
[ext_resource path="res://game/rooms/room2/walkable_area.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://game/rooms/room2/background.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://addons/escoria-core/game/core-scripts/eschotspot.gd" type="Script" id=3]
|
||||
[ext_resource path="res://game/ui/commons/fonts/caslonantique.tres" type="DynamicFont" id=3]
|
||||
[ext_resource path="res://game/characters/mark/mark.tscn" type="PackedScene" id=4]
|
||||
[ext_resource path="res://addons/escoria-core/game/core-scripts/escroom.gd" type="Script" id=6]
|
||||
[ext_resource path="res://addons/escoria-core/game/core-scripts/escitem.gd" type="Script" id=7]
|
||||
@@ -15,24 +15,30 @@ script = ExtResource( 6 )
|
||||
global_id = "room2"
|
||||
esc_script = "res://game/rooms/room2/esc/room2_bridge.esc"
|
||||
player_scene = ExtResource( 4 )
|
||||
camera_limits = [ Rect2( 0, 0, 1289, 555 ) ]
|
||||
|
||||
[node name="walkable_area" parent="." instance=ExtResource( 1 )]
|
||||
|
||||
[node name="background" parent="." instance=ExtResource( 2 )]
|
||||
|
||||
[node name="room_label" type="Label" parent="background"]
|
||||
margin_right = 40.0
|
||||
margin_bottom = 14.0
|
||||
custom_fonts/font = ExtResource( 3 )
|
||||
text = "ROOM 2"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Hotspots" type="Node2D" parent="."]
|
||||
|
||||
[node name="r_platform" type="Area2D" parent="Hotspots"]
|
||||
script = ExtResource( 3 )
|
||||
script = ExtResource( 7 )
|
||||
global_id = "r2_right_platform"
|
||||
is_exit = false
|
||||
esc_script = "res://game/rooms/room2/esc/right_platform.esc"
|
||||
is_interactive = true
|
||||
player_orients_on_arrival = true
|
||||
interaction_direction = 3
|
||||
tooltip_name = "Right platform"
|
||||
default_action = ""
|
||||
combine_if_action_used_among = PoolStringArray( )
|
||||
default_action = "look"
|
||||
dialog_color = Color( 1, 1, 1, 1 )
|
||||
interact_positions = {
|
||||
"default": Vector2( 430.893, 451.052 )
|
||||
@@ -45,16 +51,10 @@ polygon = PoolVector2Array( 870.974, 538.342, 827.536, 353.995, 1181.4, 357.174,
|
||||
position = Vector2( 430.893, 451.052 )
|
||||
|
||||
[node name="r_door" type="Area2D" parent="Hotspots"]
|
||||
script = ExtResource( 3 )
|
||||
script = ExtResource( 7 )
|
||||
global_id = "r2_r_exit"
|
||||
is_exit = true
|
||||
esc_script = "res://game/rooms/room2/esc/right_exit.esc"
|
||||
is_interactive = true
|
||||
player_orients_on_arrival = true
|
||||
interaction_direction = 0
|
||||
tooltip_name = "Exit"
|
||||
default_action = ""
|
||||
combine_if_action_used_among = PoolStringArray( )
|
||||
is_exit = true
|
||||
dialog_color = Color( 1, 1, 1, 1 )
|
||||
interact_positions = {
|
||||
"default": Vector2( 1225.47, 353.99 )
|
||||
@@ -67,16 +67,10 @@ polygon = PoolVector2Array( 1177.94, 348.61, 1175.95, 45.3759, 1276.06, 92.0953,
|
||||
position = Vector2( 1225.47, 353.99 )
|
||||
|
||||
[node name="l_door" type="Area2D" parent="Hotspots"]
|
||||
script = ExtResource( 3 )
|
||||
script = ExtResource( 7 )
|
||||
global_id = "r2_l_exit"
|
||||
is_exit = true
|
||||
esc_script = "res://game/rooms/room2/esc/left_exit.esc"
|
||||
is_interactive = true
|
||||
player_orients_on_arrival = true
|
||||
interaction_direction = 0
|
||||
tooltip_name = "Exit"
|
||||
default_action = ""
|
||||
combine_if_action_used_among = PoolStringArray( )
|
||||
is_exit = true
|
||||
dialog_color = Color( 1, 1, 1, 1 )
|
||||
interact_positions = {
|
||||
"default": Vector2( 52.1462, 384.691 )
|
||||
@@ -88,18 +82,19 @@ polygon = PoolVector2Array( -1.37926, 443.158, 7.96461, 122.796, 84.0504, 77.411
|
||||
[node name="Position2D" type="Position2D" parent="Hotspots/l_door"]
|
||||
position = Vector2( 52.1462, 384.691 )
|
||||
|
||||
[node name="button_left" type="Sprite" parent="Hotspots"]
|
||||
[node name="button_left" type="Area2D" parent="Hotspots"]
|
||||
script = ExtResource( 7 )
|
||||
global_id = "r2_button"
|
||||
esc_script = "res://game/rooms/room2/esc/button.esc"
|
||||
tooltip_name = "button"
|
||||
tooltip_name = "Button"
|
||||
default_action = "use"
|
||||
dialog_color = Color( 0.219608, 0, 1, 1 )
|
||||
dialog_color = Color( 1, 1, 1, 1 )
|
||||
interact_positions = {
|
||||
"default": Vector2( 338.117, 370.025 )
|
||||
}
|
||||
|
||||
[node name="Area2D" type="Area2D" parent="Hotspots/button_left"]
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hotspots/button_left"]
|
||||
position = Vector2( 346.507, 150.721 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hotspots/button_left/Area2D"]
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[node name="action_pos" type="Position2D" parent="Hotspots/button_left"]
|
||||
@@ -108,26 +103,26 @@ position = Vector2( 338.117, 370.025 )
|
||||
[node name="dialog_position" type="Position2D" parent="Hotspots/button_left"]
|
||||
position = Vector2( 333.879, 84.4147 )
|
||||
|
||||
[node name="button_right" type="Sprite" parent="Hotspots"]
|
||||
position = Vector2( 624.705, 0 )
|
||||
[node name="button_right" type="Area2D" parent="Hotspots"]
|
||||
script = ExtResource( 7 )
|
||||
global_id = "r2_button_right"
|
||||
esc_script = "res://game/rooms/room2/esc/button.esc"
|
||||
tooltip_name = "button"
|
||||
tooltip_name = "Button"
|
||||
default_action = "use"
|
||||
dialog_color = Color( 0.219608, 0, 1, 1 )
|
||||
dialog_color = Color( 1, 1, 1, 1 )
|
||||
interact_positions = {
|
||||
"default": Vector2( 962.822, 370.025 )
|
||||
}
|
||||
|
||||
[node name="Area2D" type="Area2D" parent="Hotspots/button_right"]
|
||||
position = Vector2( 346.507, 150.721 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hotspots/button_right/Area2D"]
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hotspots/button_right"]
|
||||
position = Vector2( 971.212, 150.721 )
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[node name="action_pos" type="Position2D" parent="Hotspots/button_right"]
|
||||
position = Vector2( 338.117, 370.025 )
|
||||
position = Vector2( 962.822, 370.025 )
|
||||
|
||||
[node name="dialog_position" type="Position2D" parent="Hotspots/button_right"]
|
||||
position = Vector2( 333.879, 84.4147 )
|
||||
position = Vector2( 958.584, 84.4147 )
|
||||
|
||||
[node name="player_start" type="Position2D" parent="."]
|
||||
position = Vector2( 76.7617, 437.649 )
|
||||
|
||||
Reference in New Issue
Block a user