Updated escoria-demo-game
This commit is contained in:
@@ -1,30 +0,0 @@
|
||||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_background.gd" type="Script" id=1]
|
||||
|
||||
[node name="background" type="TextureRect"]
|
||||
margin_right = 1289.0
|
||||
margin_bottom = 555.0
|
||||
mouse_filter = 2
|
||||
script = ExtResource( 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="l_platform" type="Line2D" parent="."]
|
||||
position = Vector2( 2, -266 )
|
||||
points = PoolVector2Array( -2.96298, 712.01, 129.973, 614.429, 1167.5, 612.894, 1274.59, 669.705, 1273.25, 812.694, 2.36697, 811.043, 2.36697, 713.389 )
|
||||
|
||||
[node name="l_door" type="Line2D" parent="."]
|
||||
position = Vector2( 0, -266 )
|
||||
points = PoolVector2Array( 6.61201, 704.409, 6.61203, 389.558, 87.755, 339.775, 87.5463, 649.784 )
|
||||
__meta__ = {
|
||||
"_editor_description_": ""
|
||||
}
|
||||
|
||||
[node name="r_door" type="Line2D" parent="."]
|
||||
position = Vector2( 0, -267.828 )
|
||||
points = PoolVector2Array( 1175.07, 620.086, 1171.24, 311.267, 1274.8, 356.87, 1278.31, 672.412, 1188.64, 624.843 )
|
||||
__meta__ = {
|
||||
"_editor_description_": ""
|
||||
}
|
||||
@@ -1,15 +1,14 @@
|
||||
|
||||
:use
|
||||
|
||||
|
||||
# Show main menu, automatic transitions ENABLED
|
||||
show_menu main true
|
||||
show_menu main
|
||||
|
||||
# wait 2 seconds
|
||||
wait 2
|
||||
|
||||
# Hide main menu, automatic transitions ENABLED
|
||||
hide_menu main true
|
||||
hide_menu main
|
||||
|
||||
:look
|
||||
say player "button main menu"
|
||||
say player "button main menu"
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
|
||||
:use
|
||||
|
||||
# This event demonstrates the following:
|
||||
#- fade out to black
|
||||
#- show the pause menu (automatic transition disabled to manage those manually)
|
||||
#- wait 2 seconds
|
||||
#- change scene (automatic transition disabled to manage those manually) to reload this same room
|
||||
|
||||
set_global transition_manual true
|
||||
|
||||
# Fade out to black
|
||||
transition fade_black out
|
||||
wait 2
|
||||
|
||||
# Show main menu, automatic transition DISABLED
|
||||
show_menu pause
|
||||
|
||||
# Showing menu
|
||||
transition shards in
|
||||
|
||||
# Wait 2 seconds on menu
|
||||
wait 2
|
||||
|
||||
# Transition out before hiding menu
|
||||
transition fade_black out
|
||||
|
||||
# Hide the menu
|
||||
hide_menu pause
|
||||
wait 1
|
||||
|
||||
# Do NOT transition IN as this transition will be managed by the room's :setup event!
|
||||
# If you transition IN here instead of room's :setup event, you will show the previous room
|
||||
|
||||
# Change scene to same scene, disabled automatic transition
|
||||
change_scene res://game/rooms/room14/room14.tscn false
|
||||
|
||||
# Do not transition here either, as change_scene ends the execution of this script
|
||||
|
||||
:look
|
||||
say player "Button change scene"
|
||||
@@ -1,30 +0,0 @@
|
||||
|
||||
:use
|
||||
|
||||
# This event demonstrates the following:
|
||||
#- fade out to black
|
||||
#- show the pause menu (automatic transition disabled to manage those manually)
|
||||
#- wait 2 seconds
|
||||
#- change scene (automatic transition enabled) to reload this same room
|
||||
|
||||
set_global transition_manual false
|
||||
|
||||
# Fade out to black
|
||||
transition fade_black out
|
||||
wait 2
|
||||
|
||||
# Show main menu, automatic transition DISABLED
|
||||
show_menu pause
|
||||
|
||||
# Showing menu
|
||||
transition shards in
|
||||
|
||||
# Wait 2 seconds on menu
|
||||
wait 2
|
||||
|
||||
# Change scene to same scene, enabled automatic transition
|
||||
change_scene res://game/rooms/room14/room14.tscn
|
||||
|
||||
|
||||
:look
|
||||
say player "Button change scene auto"
|
||||
@@ -1,16 +1,12 @@
|
||||
|
||||
:use
|
||||
|
||||
# Show pause menu, automatic transition are disabled by default
|
||||
# So we can manage them manually using `transition` ESC command
|
||||
# Show pause menu
|
||||
show_menu pause
|
||||
|
||||
# wait 2 seconds
|
||||
# Wait 2 seconds (this will run AFTER the pause menu is closed since the pause
|
||||
# menu also pauses the game)
|
||||
wait 2
|
||||
|
||||
# Hide pause menu, automatic transition are disabled by default
|
||||
# So we can manage them manually using `transition` ESC command
|
||||
hide_menu pause
|
||||
|
||||
:look
|
||||
say player "Button pause menu"
|
||||
say player "Button pause menu"
|
||||
|
||||
@@ -44,4 +44,4 @@
|
||||
queue_event worker moveworker _queuedemo true
|
||||
queue_event worker2 moveworker2 _queuedemo
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
[gd_scene load_steps=12 format=2]
|
||||
[gd_scene load_steps=11 format=2]
|
||||
|
||||
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_terrain.gd" type="Script" id=1]
|
||||
[ext_resource path="res://game/rooms/room14/background.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://game/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/esc_location.gd" type="Script" id=5]
|
||||
@@ -26,9 +25,25 @@ esc_script = "res://game/rooms/room14/esc/room14.esc"
|
||||
player_scene = ExtResource( 4 )
|
||||
camera_limits = [ Rect2( 0, 0, 1280, 555 ) ]
|
||||
|
||||
[node name="background" parent="." instance=ExtResource( 2 )]
|
||||
[node name="l_platform" type="Line2D" parent="."]
|
||||
position = Vector2( 2, -266 )
|
||||
points = PoolVector2Array( -2.96298, 712.01, 129.973, 614.429, 1167.5, 612.894, 1274.59, 669.705, 1273.25, 812.694, 2.36697, 811.043, 2.36697, 713.389 )
|
||||
|
||||
[node name="room_label" type="Label" parent="background"]
|
||||
[node name="l_door" type="Line2D" parent="."]
|
||||
position = Vector2( 0, -266 )
|
||||
points = PoolVector2Array( 6.61201, 704.409, 6.61203, 389.558, 87.755, 339.775, 87.5463, 649.784 )
|
||||
__meta__ = {
|
||||
"_editor_description_": ""
|
||||
}
|
||||
|
||||
[node name="r_door" type="Line2D" parent="."]
|
||||
position = Vector2( 0, -267.828 )
|
||||
points = PoolVector2Array( 1175.07, 620.086, 1171.24, 311.267, 1274.8, 356.87, 1278.31, 672.412, 1188.64, 624.843 )
|
||||
__meta__ = {
|
||||
"_editor_description_": ""
|
||||
}
|
||||
|
||||
[node name="room_label" type="Label" parent="."]
|
||||
margin_right = 92.0
|
||||
margin_bottom = 21.0
|
||||
custom_fonts/font = ExtResource( 3 )
|
||||
@@ -100,13 +115,8 @@ margin_top = 194.216
|
||||
margin_right = 408.569
|
||||
margin_bottom = 259.216
|
||||
text = "Show main menu
|
||||
with automatic
|
||||
transitions enabled
|
||||
"
|
||||
align = 1
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="show_pause_menu" parent="." instance=ExtResource( 9 )]
|
||||
position = Vector2( 233.415, 0 )
|
||||
@@ -123,59 +133,9 @@ margin_left = 273.915
|
||||
margin_top = 194.216
|
||||
margin_right = 413.915
|
||||
margin_bottom = 242.216
|
||||
text = "Show pause menu
|
||||
with NO transition
|
||||
(manual or automatic)"
|
||||
text = "Show pause menu"
|
||||
align = 1
|
||||
|
||||
[node name="show_pause_change_scene_manual" parent="." instance=ExtResource( 9 )]
|
||||
position = Vector2( 463.318, 0 )
|
||||
global_id = "button_main_change_scene"
|
||||
esc_script = "res://game/rooms/room14/esc/button_main_menu_change_scene.esc"
|
||||
combine_when_selected_action_is_in = [ ]
|
||||
|
||||
[node name="ESCLocation" type="Position2D" parent="show_pause_change_scene_manual"]
|
||||
position = Vector2( 343.887, 381.305 )
|
||||
script = ExtResource( 5 )
|
||||
|
||||
[node name="Label" type="Label" parent="show_pause_change_scene_manual"]
|
||||
margin_left = 277.027
|
||||
margin_top = 194.0
|
||||
margin_right = 428.027
|
||||
margin_bottom = 259.0
|
||||
text = "Show pause menu with
|
||||
manual transition
|
||||
and change_scene with
|
||||
manual transition"
|
||||
align = 1
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="show_pause_change_scene_auto" parent="." instance=ExtResource( 9 )]
|
||||
position = Vector2( 676.318, 0 )
|
||||
global_id = "button_pause_change_scene_auto"
|
||||
esc_script = "res://game/rooms/room14/esc/button_main_menu_change_scene_auto.esc"
|
||||
combine_when_selected_action_is_in = [ ]
|
||||
|
||||
[node name="ESCLocation" type="Position2D" parent="show_pause_change_scene_auto"]
|
||||
position = Vector2( 343.887, 381.305 )
|
||||
script = ExtResource( 5 )
|
||||
|
||||
[node name="Label" type="Label" parent="show_pause_change_scene_auto"]
|
||||
margin_left = 277.027
|
||||
margin_top = 194.0
|
||||
margin_right = 428.027
|
||||
margin_bottom = 259.0
|
||||
text = "Show pause menu with
|
||||
manual transition
|
||||
and change_scene with
|
||||
automatic transition"
|
||||
align = 1
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="worker" parent="." instance=ExtResource( 10 )]
|
||||
position = Vector2( 204.268, 376.233 )
|
||||
esc_script = "res://game/rooms/room14/esc/worker.esc"
|
||||
|
||||
Reference in New Issue
Block a user