This commit is contained in:
2023-02-07 16:21:22 +01:00
parent 0ba6c3782a
commit 4371d1d386
46 changed files with 1702 additions and 52 deletions

View File

@@ -0,0 +1,41 @@
# Room script template
# ":setup" is used to configure anything you want in place before the
# transition-in event runs (i.e. anything you need to set up before the player
# sees the room). Reset movable objects to their start positions here.
:setup
# ":ready" runs after any events configured in setup complete. It is used to
# configure everything that happens after the transition-in (if any) completes.
# runs. Story telling events go here (e.g. if you want the character to walk to
# a specific location in the room before giving control to the player.)
:ready
# Code examples - feel free to delete this section
#
# 1) Run this code when the player enters this room for the first time only.
# This assumes your room is called "room_hallway". Also resets the "window"
# to closed by playing the animation "close_window" using 'set_state'.
#
# > [!room_hallway_visited]
# set_global room_hallway_visited true
# set_state window close_window true
#
#
# 2) Change where the player starts depending on which doorway they entered
# the room from. Assumes your character is called "cleaner"
#
# > [eq ESC_LAST_SCENE room2]
# teleport cleaner r1_r_exit
# # Set cleaner look left
# set_angle cleaner 270
#
#

32
Null/test01/test01.tscn Normal file
View File

@@ -0,0 +1,32 @@
[gd_scene load_steps=6 format=2]
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_background.gd" type="Script" id=1]
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_room.gd" type="Script" id=2]
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_terrain.gd" type="Script" id=3]
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_location.gd" type="Script" id=4]
[sub_resource type="NavigationPolygon" id=1]
[node name="test01" type="Node2D"]
script = ExtResource( 2 )
global_id = "test01"
[node name="Background" type="TextureRect" parent="."]
margin_right = 1280.0
margin_bottom = 900.0
mouse_filter = 2
script = ExtResource( 1 )
[node name="WalkableArea" type="Navigation2D" parent="."]
script = ExtResource( 3 )
[node name="NavigationPolygonInstance" type="NavigationPolygonInstance" parent="WalkableArea"]
navpoly = SubResource( 1 )
[node name="RoomObjects" type="Node2D" parent="."]
[node name="StartPos" type="Position2D" parent="."]
position = Vector2( 640, 450 )
script = ExtResource( 4 )
global_id = "test01_start_pos"
is_start_location = true