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:
Julian Murgia
2021-01-12 23:05:23 +01:00
parent 933122f085
commit ff56816205
73 changed files with 1211 additions and 1652 deletions

View File

@@ -1,9 +1,10 @@
[gd_scene load_steps=9 format=2]
[gd_scene load_steps=10 format=2]
[ext_resource path="res://addons/escoria-core/game/core-scripts/escterrain.gd" type="Script" id=1]
[ext_resource path="res://addons/escoria-core/game/core-scripts/escbackground.gd" type="Script" 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/escitem.gd" type="Script" id=5]
[ext_resource path="res://addons/escoria-core/game/core-scripts/escroom.gd" type="Script" id=6]
[ext_resource path="res://game/rooms/room4/assets/background.png" type="Texture" id=7]
[ext_resource path="res://game/rooms/room4/assets/depth_reduced.png" type="Texture" id=8]
@@ -19,7 +20,6 @@ global_id = "room4"
esc_script = "res://game/rooms/room4/esc/room4.esc"
player_scene = ExtResource( 4 )
camera_limits = [ Rect2( 0, 0, 1666, 574 ) ]
editor_debug_mode = 1
[node name="background" type="TextureRect" parent="."]
margin_right = 1666.0
@@ -49,6 +49,12 @@ points = PoolVector2Array( 2252.91, 610.733, 2251.32, 332.938, 2384.66, 386.909,
visible = false
points = PoolVector2Array( 6.10242, 307.886, 2.0979, 129.017, 84.858, 129.017, 84.858, 311.89, 4.76758, 307.886 )
[node name="room_label" type="Label" parent="background"]
margin_right = 40.0
margin_bottom = 14.0
custom_fonts/font = ExtResource( 3 )
text = "ROOM 4"
[node name="walkable_area" type="Navigation2D" parent="."]
script = ExtResource( 1 )
scales = ExtResource( 8 )
@@ -64,16 +70,15 @@ __meta__ = {
}
[node name="player_start" type="Position2D" parent="."]
position = Vector2( 1506.21, 410.473 )
position = Vector2( 82.9282, 347.615 )
[node name="Hotspots" type="Node2D" parent="."]
[node name="l_door" type="Area2D" parent="Hotspots"]
script = ExtResource( 3 )
script = ExtResource( 5 )
global_id = "l_exit"
is_exit = true
esc_script = "res://game/rooms/room4/esc/left_exit.esc"
tooltip_name = "Exit"
is_exit = true
dialog_color = Color( 1, 1, 1, 1 )
interact_positions = {
"default": Vector2( 83.6298, 279.703 )
@@ -86,11 +91,10 @@ polygon = PoolVector2Array( 29.1046, 292.156, 31.0151, 76.8949, 147.177, 74.4792
position = Vector2( 83.6298, 279.703 )
[node name="r_door" type="Area2D" parent="Hotspots"]
script = ExtResource( 3 )
script = ExtResource( 5 )
global_id = "r_exit"
is_exit = true
esc_script = "res://game/rooms/room4/esc/right_exit.esc"
tooltip_name = "Exit"
is_exit = true
dialog_color = Color( 1, 1, 1, 1 )
interact_positions = {
"default": Vector2( 1611.46, 301.017 )