Add ESCLocation node (#323)

Fixes #306
This commit is contained in:
Julian Murgia
2021-07-15 09:42:22 +02:00
committed by GitHub
parent 958c8b441b
commit 43dc217359
15 changed files with 142 additions and 16 deletions

View File

@@ -12,3 +12,4 @@
:ready
set_sound_state bg_music res://game/sfx/contemplation.ogg true
walk player r1_destination_point

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=7 format=2]
[gd_scene load_steps=8 format=2]
[ext_resource path="res://game/rooms/room01/walkable_area.tscn" type="PackedScene" id=1]
[ext_resource path="res://game/rooms/room01/background.tscn" type="PackedScene" id=2]
@@ -6,6 +6,7 @@
[ext_resource path="res://game/characters/mark/mark.tscn" type="PackedScene" id=4]
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_item.gd" type="Script" id=5]
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_room.gd" type="Script" id=6]
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_location.gd" type="Script" id=7]
[node name="room1" type="Node2D"]
script = ExtResource( 6 )
@@ -63,6 +64,7 @@ polygon = PoolVector2Array( 1177.94, 348.61, 1175.95, 45.3759, 1276.06, 92.0953,
[node name="Position2D" type="Position2D" parent="Hotspots/r_door"]
position = Vector2( 1225.47, 353.99 )
script = ExtResource( 7 )
[node name="item" type="Area2D" parent="Hotspots"]
position = Vector2( -217.19, 0 )
@@ -78,6 +80,8 @@ polygon = PoolVector2Array( 635.586, 253.345, 568.928, 60.1716, 709.047, 120.028
[node name="Position2D" type="Position2D" parent="Hotspots/item"]
position = Vector2( 671.798, 373.035 )
script = ExtResource( 7 )
global_id = "r1_left_object_interaction"
[node name="Line2D" type="Line2D" parent="Hotspots/item"]
position = Vector2( 0, -267.828 )
@@ -111,6 +115,8 @@ polygon = PoolVector2Array( 635.586, 253.345, 568.928, 60.1716, 709.047, 120.028
[node name="Position2D" type="Position2D" parent="Hotspots/item2"]
position = Vector2( 671.798, 373.035 )
script = ExtResource( 7 )
global_id = "r2_left_object_interaction"
[node name="Line2D" type="Line2D" parent="Hotspots/item2"]
position = Vector2( -4.23779, -267.828 )
@@ -132,3 +138,11 @@ __meta__ = {
[node name="player_start" type="Position2D" parent="."]
position = Vector2( 76.7617, 437.649 )
script = ExtResource( 7 )
global_id = "r1_start"
[node name="destination_point" type="Position2D" parent="."]
position = Vector2( 476.984, 487.146 )
script = ExtResource( 7 )
global_id = "r1_destination_point"
interaction_direction = 4