Continued camera effects adding (zoom, shift)

Added trigger behaviour to ESCItem and removed ESCTriggerZone.
This commit is contained in:
Julian Murgia
2021-01-18 23:32:38 +01:00
parent ff56816205
commit 6890d927f5
24 changed files with 581 additions and 246 deletions

View File

@@ -0,0 +1,103 @@
[gd_scene load_steps=10 format=2]
[ext_resource path="res://addons/escoria-core/game/core-scripts/escitem.gd" type="Script" id=1]
[ext_resource path="res://game/rooms/room3/smoke.png" type="Texture" id=2]
[sub_resource type="Gradient" id=1]
offsets = PoolRealArray( 0, 0.830189 )
colors = PoolColorArray( 1, 1, 1, 1, 0.353516, 0.353516, 0.353516, 1 )
[sub_resource type="GradientTexture" id=2]
gradient = SubResource( 1 )
[sub_resource type="Curve" id=3]
_data = [ Vector2( 0, 0.0886364 ), 0.0, 0.0, 0, 0, Vector2( 0.612766, 1 ), 0.0, 0.0, 0, 0, Vector2( 0.770213, 0.95 ), -1.55372, -1.55372, 0, 0, Vector2( 1, 0 ), 0.0, 0.0, 0, 0 ]
[sub_resource type="CurveTexture" id=4]
curve = SubResource( 3 )
[sub_resource type="ParticlesMaterial" id=5]
lifetime_randomness = 0.2
emission_shape = 1
emission_sphere_radius = 1.0
flag_disable_z = true
gravity = Vector3( 0, -9.81, 0 )
angular_velocity = 14.47
orbit_velocity = 0.0
orbit_velocity_random = 1.0
radial_accel = 3.97
radial_accel_random = 0.63
angle = 160.0
angle_random = 1.0
scale = 0.5
scale_random = 0.45
scale_curve = SubResource( 4 )
color_ramp = SubResource( 2 )
[sub_resource type="Animation" id=6]
resource_name = "button_broken"
tracks/0/type = "value"
tracks/0/path = NodePath("Particles2D:emitting")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ true ]
}
[sub_resource type="Animation" id=7]
resource_name = "button_repaired"
tracks/0/type = "value"
tracks/0/path = NodePath("Particles2D:emitting")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ false ]
}
[node name="button" type="Area2D"]
script = ExtResource( 1 )
global_id = "r3_button"
esc_script = "res://game/rooms/room3/esc/button.esc"
tooltip_name = "Button"
default_action = "use"
dialog_color = Color( 1, 1, 1, 1 )
interact_positions = {
"default": Vector2( 0, 0 )
}
[node name="lines" type="Line2D" parent="."]
position = Vector2( 0, -266.591 )
points = PoolVector2Array( 322.305, 390.985, 322.305, 439.068, 368.698, 440.037, 368.974, 392.399, 319.028, 391.549 )
[node name="Polygon2D" type="Polygon2D" parent="lines"]
visible = false
polygon = PoolVector2Array( 343.993, 396.767, 323.298, 415.689, 344.585, 438.158, 365.872, 417.463 )
[node name="Particles2D" type="Particles2D" parent="."]
position = Vector2( 344.768, 142.144 )
amount = 16
lifetime = 4.0
preprocess = 1.99
speed_scale = 1.39
process_material = SubResource( 5 )
texture = ExtResource( 2 )
__meta__ = {
"_editor_description_": ""
}
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
anims/button_broken = SubResource( 6 )
anims/button_repaired = SubResource( 7 )
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
polygon = PoolVector2Array( 319.633, 122.126, 320.427, 177.685, 371.224, 176.098, 372.811, 121.332 )

View File

@@ -1,70 +1,7 @@
[gd_scene load_steps=12 format=2]
[gd_scene load_steps=3 format=2]
[ext_resource path="res://addons/escoria-core/game/core-scripts/escbackground.gd" type="Script" id=1]
[ext_resource path="res://game/rooms/room2/bridge.tscn" type="PackedScene" id=2]
[ext_resource path="res://game/rooms/room3/smoke.png" type="Texture" id=3]
[ext_resource path="res://addons/escoria-core/game/core-scripts/escitem.gd" type="Script" id=4]
[sub_resource type="Gradient" id=1]
offsets = PoolRealArray( 0, 0.830189 )
colors = PoolColorArray( 1, 1, 1, 1, 0.353516, 0.353516, 0.353516, 1 )
[sub_resource type="GradientTexture" id=2]
gradient = SubResource( 1 )
[sub_resource type="Curve" id=3]
_data = [ Vector2( 0, 0.0886364 ), 0.0, 0.0, 0, 0, Vector2( 0.612766, 1 ), 0.0, 0.0, 0, 0, Vector2( 0.770213, 0.95 ), -1.55372, -1.55372, 0, 0, Vector2( 1, 0 ), 0.0, 0.0, 0, 0 ]
[sub_resource type="CurveTexture" id=4]
curve = SubResource( 3 )
[sub_resource type="ParticlesMaterial" id=5]
lifetime_randomness = 0.2
emission_shape = 1
emission_sphere_radius = 1.0
flag_disable_z = true
gravity = Vector3( 0, -9.81, 0 )
angular_velocity = 14.47
orbit_velocity = 0.0
orbit_velocity_random = 1.0
radial_accel = 3.97
radial_accel_random = 0.63
angle = 160.0
angle_random = 1.0
scale = 0.5
scale_random = 0.45
scale_curve = SubResource( 4 )
color_ramp = SubResource( 2 )
[sub_resource type="Animation" id=6]
resource_name = "button_broken"
tracks/0/type = "value"
tracks/0/path = NodePath("Particles2D:emitting")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ true ]
}
[sub_resource type="Animation" id=7]
resource_name = "button_repaired"
tracks/0/type = "value"
tracks/0/path = NodePath("Particles2D:emitting")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ false ]
}
[node name="background" type="TextureRect"]
margin_right = 1300.0
@@ -96,44 +33,3 @@ global_id = "r3_bridge"
interact_positions = {
"default": Vector2( 0, 0 )
}
[node name="button" type="Area2D" parent="."]
script = ExtResource( 4 )
global_id = "r3_button"
esc_script = "res://game/rooms/room3/esc/button.esc"
tooltip_name = "Button"
default_action = "use"
dialog_color = Color( 1, 1, 1, 1 )
interact_positions = {
"default": Vector2( 347.767, 378.011 )
}
[node name="lines" type="Line2D" parent="button"]
position = Vector2( 0, -266.591 )
points = PoolVector2Array( 322.305, 390.985, 322.305, 439.068, 368.698, 440.037, 368.974, 392.399, 319.028, 391.549 )
[node name="Polygon2D" type="Polygon2D" parent="button/lines"]
visible = false
polygon = PoolVector2Array( 343.993, 396.767, 323.298, 415.689, 344.585, 438.158, 365.872, 417.463 )
[node name="Particles2D" type="Particles2D" parent="button"]
position = Vector2( 344.768, 142.144 )
amount = 16
lifetime = 4.0
preprocess = 1.99
speed_scale = 1.39
process_material = SubResource( 5 )
texture = ExtResource( 3 )
__meta__ = {
"_editor_description_": ""
}
[node name="AnimationPlayer" type="AnimationPlayer" parent="button"]
anims/button_broken = SubResource( 6 )
anims/button_repaired = SubResource( 7 )
[node name="interact_pos" type="Position2D" parent="button"]
position = Vector2( 347.767, 378.011 )
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="button"]
polygon = PoolVector2Array( 319.633, 122.126, 320.427, 177.685, 371.224, 176.098, 372.811, 121.332 )

View File

@@ -1,59 +0,0 @@
[gd_scene load_steps=5 format=2]
[ext_resource path="res://addons/escoria-core/game/core-scripts/escitem.gd" type="Script" id=1]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 28.6442, 23.5021 )
[sub_resource type="Animation" id=2]
resource_name = "button_broken"
tracks/0/type = "value"
tracks/0/path = NodePath("../../background/button/Particles2D:emitting")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ true ]
}
[sub_resource type="Animation" id=3]
resource_name = "button_repaired"
tracks/0/type = "value"
tracks/0/path = NodePath("../../background/button/Particles2D:emitting")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ false ]
}
[node name="button" type="Area2D"]
position = Vector2( 346.18, 151.013 )
script = ExtResource( 1 )
__meta__ = {
"_editor_description_": ""
}
global_id = "button"
esc_script = "res://game/rooms/room3/esc/button.esc"
tooltip_name = "Button"
dialog_color = Color( 1, 1, 1, 1 )
interact_positions = {
"default": Vector2( 346.18, 151.013 )
}
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource( 1 )
[node name="Position2D" type="Position2D" parent="."]
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
anims/button_broken = SubResource( 2 )
anims/button_repaired = SubResource( 3 )

View File

@@ -1,3 +1,7 @@
:ready
set_state r3_button button_broken
:look
say player "That button must activate the bridge, but it is broken." [button_broken]
say player "It should work now." [!button_broken]

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/room3/walkable_area.tscn" type="PackedScene" id=1]
[ext_resource path="res://game/rooms/room3/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/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/items/escitems/button.tscn" type="PackedScene" id=7]
[node name="room3" type="Node2D"]
script = ExtResource( 6 )
@@ -90,5 +91,16 @@ polygon = PoolVector2Array( -2.71457, 437.818, 6.6293, 121.462, 89.3893, 74.7422
[node name="Position2D" type="Position2D" parent="Hotspots/l_door"]
position = Vector2( 44.1375, 384.691 )
[node name="button" parent="Hotspots" instance=ExtResource( 7 )]
interact_positions = {
"default": Vector2( 347.767, 378.011 )
}
[node name="Position2D" type="Position2D" parent="Hotspots/button"]
position = Vector2( 347.767, 378.011 )
__meta__ = {
"_editor_description_": ""
}
[node name="player_start" type="Position2D" parent="."]
position = Vector2( 63.3074, 444.653 )

View File

@@ -0,0 +1,7 @@
:look
say player "That button makes the camera target me."
:use
camera_set_limits 0
camera_set_target 0 player

View File

@@ -0,0 +1,7 @@
:look
say player "That button triggers a camera push effect."
:use
camera_push r7_object2 1 LINEAR
wait 3
camera_push player 1 LINEAR

View File

@@ -0,0 +1,7 @@
:look
say player "That button triggers a camera shift effect."
:use
camera_shift 700 0 5 LINEAR
wait 1

View File

@@ -0,0 +1,10 @@
:look
say player "That button triggers a camera zoom effect."
:use
camera_set_zoom 1.3 2
wait 3
camera_set_zoom 0.5 2
wait 3
camera_set_zoom 1 0

View File

@@ -1,4 +1,8 @@
# :SETUP is called EVERY TIME the room is loaded
# :READY is called only the FIRST TIME the room is loaded
:setup
set_state r7_button_push button_repaired
> [eq ESC_LAST_SCENE room6]
teleport player r7_l_exit
# Set player look right
@@ -8,13 +12,13 @@
teleport player player_start
stop
:ready
camera_push player 0 LINEAR
camera_push r7_object2 1 LINEAR
wait 3
camera_push player 1 LINEAR
#camera_push player 0 LINEAR
#camera_push r7_object2 1 LINEAR
#wait 3
#camera_push player 1 LINEAR
#camera_set_drag_margin_enabled bool bool
#camera_set_pos real int int

View File

@@ -0,0 +1,4 @@
:trigger_in
set_state r7_light_left red
:trigger_out

View File

@@ -0,0 +1,5 @@
:trigger_in
set_state r7_light_right green
:trigger_out
set_state r7_light_right red

View File

@@ -1,7 +1,8 @@
[gd_scene load_steps=9 format=2]
[gd_scene load_steps=16 format=2]
[ext_resource path="res://addons/escoria-core/game/core-scripts/escterrain.gd" type="Script" id=1]
[ext_resource path="res://game/rooms/room7/background.tscn" type="PackedScene" id=2]
[ext_resource path="res://game/items/escitems/button.tscn" type="PackedScene" id=3]
[ext_resource path="res://game/characters/mark/mark.tscn" type="PackedScene" id=4]
[ext_resource path="res://game/ui/commons/fonts/caslonantique.tres" type="DynamicFont" id=5]
[ext_resource path="res://addons/escoria-core/game/core-scripts/escroom.gd" type="Script" id=6]
@@ -17,6 +18,72 @@ vertices = PoolVector2Array( 2031.55, -451.45, 135.719, -939.662, 287.172, -941.
polygons = [ PoolIntArray( 0, 1, 2, 3, 4 ), PoolIntArray( 5, 4, 3 ), PoolIntArray( 5, 3, 6, 7, 8 ) ]
outlines = [ PoolVector2Array( 2027.99, -629.63, 1390.1, -752.574, 1448.12, -803.5, 1425.74, -843.446, 1343.78, -834.537, 1235.09, -777.519, 287.172, -941.444, 135.719, -939.662, 2031.55, -451.45 ) ]
[sub_resource type="RectangleShape2D" id=3]
extents = Vector2( 79.0288, 129.758 )
[sub_resource type="CircleShape2D" id=4]
radius = 35.4361
[sub_resource type="Animation" id=5]
resource_name = "green"
tracks/0/type = "value"
tracks/0/path = NodePath("Polygon2D:color")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ Color( 0.0313726, 0.996078, 0, 1 ) ]
}
[sub_resource type="Animation" id=9]
resource_name = "red"
tracks/0/type = "value"
tracks/0/path = NodePath("Polygon2D:color")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ Color( 1, 0, 0, 1 ) ]
}
[sub_resource type="Animation" id=7]
resource_name = "green"
tracks/0/type = "value"
tracks/0/path = NodePath("Polygon2D:color")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ Color( 0.0313726, 0.996078, 0, 1 ) ]
}
[sub_resource type="Animation" id=10]
resource_name = "red"
tracks/0/type = "value"
tracks/0/path = NodePath("Polygon2D:color")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ Color( 1, 0, 0, 1 ) ]
}
[node name="room7" type="Node2D"]
script = ExtResource( 6 )
__meta__ = {
@@ -37,6 +104,9 @@ margin_right = 40.0
margin_bottom = 14.0
custom_fonts/font = ExtResource( 5 )
text = "ROOM 7 - upstairs"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="room_label_2" type="Label" parent="background"]
margin_top = 1354.53
@@ -111,8 +181,25 @@ __meta__ = {
"_editor_description_": ""
}
[node name="object_1" type="Area2D" parent="Hotspots"]
position = Vector2( 358.099, -1195.07 )
script = ExtResource( 7 )
global_id = "r7_object_1"
dialog_color = Color( 1, 1, 1, 1 )
interact_positions = {
"default": Vector2( 818.94, 320.88 )
}
[node name="Line2D" type="Line2D" parent="Hotspots/object_1"]
position = Vector2( 0, 1345.52 )
points = PoolVector2Array( 398.738, 142.591, 518.947, 64.809, 516.118, 275.527 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hotspots/object_1"]
position = Vector2( 460.841, 1515.95 )
shape = SubResource( 3 )
[node name="object2" type="Area2D" parent="Hotspots"]
position = Vector2( 1600.63, 1358.99 )
position = Vector2( 1770.63, 1358.99 )
script = ExtResource( 7 )
__meta__ = {
"_editor_description_": ""
@@ -156,6 +243,10 @@ global_id = "r7_upper_stairs"
esc_script = "res://game/rooms/room7/esc/upper_stairs.esc"
is_exit = true
tooltip_name = "Stairs"
dialog_color = Color( 1, 1, 1, 1 )
interact_positions = {
"default": Vector2( 1375.17, 604.793 )
}
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Hotspots/upper_stairs"]
position = Vector2( -1334.92, 936.565 )
@@ -164,9 +255,197 @@ polygon = PoolVector2Array( 1221.86, -804.627, 1220.52, -1158.36, 1450.46, -1134
[node name="Position2D" type="Position2D" parent="Hotspots/upper_stairs"]
position = Vector2( 27.5337, 131.767 )
[node name="object_1" type="Line2D" parent="Hotspots"]
position = Vector2( 0, 1345.52 )
points = PoolVector2Array( 398.738, 142.591, 518.947, 64.809, 516.118, 275.527 )
[node name="button_camera_push" parent="Hotspots" instance=ExtResource( 3 )]
position = Vector2( -167.43, 1463.23 )
global_id = "r7_button_push"
esc_script = "res://game/rooms/room7/esc/button_push.esc"
interact_positions = {
"default": Vector2( 279.618, 1763.84 )
}
[node name="Position2D" type="Position2D" parent="Hotspots/button_camera_push"]
position = Vector2( 343.048, 300.613 )
__meta__ = {
"_editor_description_": ""
}
[node name="Label" type="Label" parent="Hotspots/button_camera_push"]
margin_left = 304.871
margin_top = 97.219
margin_right = 384.871
margin_bottom = 113.219
custom_fonts/font = ExtResource( 5 )
text = "Camera_push"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="button_camera_shift" parent="Hotspots" instance=ExtResource( 3 )]
position = Vector2( 9.393, 1464.03 )
global_id = "r7_button_push"
esc_script = "res://game/rooms/room7/esc/button_shift.esc"
interact_positions = {
"default": Vector2( 463.651, 1765.65 )
}
[node name="Position2D" type="Position2D" parent="Hotspots/button_camera_shift"]
position = Vector2( 350.258, 301.616 )
[node name="Label" type="Label" parent="Hotspots/button_camera_shift"]
margin_left = 305.626
margin_top = 97.515
margin_right = 387.626
margin_bottom = 113.515
custom_fonts/font = ExtResource( 5 )
text = "Camera_shift"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="button_camera_follow" parent="Hotspots" instance=ExtResource( 3 )]
position = Vector2( 172.527, 1464.03 )
global_id = "r7_button_follow"
esc_script = "res://game/rooms/room7/esc/button_follow.esc"
interact_positions = {
"default": Vector2( 463.651, 1765.65 )
}
[node name="Position2D" type="Position2D" parent="Hotspots/button_camera_follow"]
position = Vector2( 350.258, 301.616 )
[node name="Label" type="Label" parent="Hotspots/button_camera_follow"]
margin_left = 305.626
margin_top = 97.515
margin_right = 387.626
margin_bottom = 113.515
custom_fonts/font = ExtResource( 5 )
text = "Camera_follow"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="button_camera_zoom" parent="Hotspots" instance=ExtResource( 3 )]
position = Vector2( 332.527, 1464.03 )
global_id = "r7_button_zoom"
esc_script = "res://game/rooms/room7/esc/button_zoom.esc"
interact_positions = {
"default": Vector2( 522.785, 1765.65 )
}
[node name="Position2D" type="Position2D" parent="Hotspots/button_camera_zoom"]
position = Vector2( 350.258, 301.616 )
[node name="Label" type="Label" parent="Hotspots/button_camera_zoom"]
margin_left = 305.626
margin_top = 97.515
margin_right = 387.626
margin_bottom = 113.515
custom_fonts/font = ExtResource( 5 )
text = "Camera_zoom"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="trigger_left" type="Area2D" parent="Hotspots"]
position = Vector2( 406, 0 )
script = ExtResource( 7 )
global_id = "trigger_left"
esc_script = "res://game/rooms/room7/esc/trigger_left.esc"
is_trigger = true
is_interactive = false
player_orients_on_arrival = false
dialog_color = Color( 1, 1, 1, 1 )
interact_positions = {
"default": null
}
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Hotspots/trigger_left"]
polygon = PoolVector2Array( 724.356, 1944.36, 716.865, 1752.57, 800.77, 1752.57, 814.254, 1942.86 )
[node name="Label" type="Label" parent="Hotspots/trigger_left"]
margin_left = 672.764
margin_top = 1705.64
margin_right = 812.764
margin_bottom = 1740.64
custom_fonts/font = ExtResource( 5 )
text = "This trigger is activated
once if player walks on it"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="trigger_right" type="Area2D" parent="Hotspots"]
position = Vector2( 220, 0 )
script = ExtResource( 7 )
global_id = "trigger_right"
esc_script = "res://game/rooms/room7/esc/trigger_right.esc"
is_trigger = true
is_interactive = false
player_orients_on_arrival = false
dialog_color = Color( 1, 1, 1, 1 )
interact_positions = {
"default": null
}
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Hotspots/trigger_right"]
position = Vector2( 372.68, 4.12805 )
polygon = PoolVector2Array( 724.356, 1944.36, 716.865, 1752.57, 800.77, 1752.57, 814.254, 1942.86 )
[node name="Label" type="Label" parent="Hotspots/trigger_right"]
margin_left = 1068.46
margin_top = 1707.64
margin_right = 1218.46
margin_bottom = 1742.64
custom_fonts/font = ExtResource( 5 )
text = "This trigger activates when
player walks in AND out"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="light_left" type="Area2D" parent="Hotspots"]
position = Vector2( 412, 0 )
script = ExtResource( 7 )
global_id = "r7_light_left"
is_interactive = false
dialog_color = Color( 1, 1, 1, 1 )
interact_positions = {
"default": null
}
[node name="Polygon2D" type="Polygon2D" parent="Hotspots/light_left"]
color = Color( 0.0313726, 0.996078, 0, 1 )
polygon = PoolVector2Array( 718.946, 1494.91, 709.047, 1518.24, 717.885, 1540.16, 740.837, 1551.8, 764.908, 1541.57, 774.1, 1519.65, 763.847, 1494.2, 742.336, 1484.38 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hotspots/light_left"]
position = Vector2( 742.194, 1518.8 )
shape = SubResource( 4 )
[node name="AnimationPlayer" type="AnimationPlayer" parent="Hotspots/light_left"]
anims/green = SubResource( 5 )
anims/red = SubResource( 9 )
[node name="light_right" type="Area2D" parent="Hotspots"]
position = Vector2( 613.333, -1.13 )
script = ExtResource( 7 )
global_id = "r7_light_right"
is_interactive = false
dialog_color = Color( 1, 1, 1, 1 )
interact_positions = {
"default": Vector2( 742.194, 1518.8 )
}
[node name="Polygon2D" type="Polygon2D" parent="Hotspots/light_right"]
color = Color( 1, 0, 0, 1 )
polygon = PoolVector2Array( 718.946, 1494.91, 709.047, 1518.24, 717.885, 1540.16, 740.837, 1551.8, 764.908, 1541.57, 774.1, 1519.65, 763.847, 1494.2, 742.336, 1484.38 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hotspots/light_right"]
position = Vector2( 742.194, 1518.8 )
shape = SubResource( 4 )
[node name="AnimationPlayer" type="AnimationPlayer" parent="Hotspots/light_right"]
anims/green = SubResource( 7 )
anims/red = SubResource( 10 )
[node name="player_start" type="Position2D" parent="."]
position = Vector2( 76.7617, 1847.24 )

View File

@@ -16,9 +16,9 @@
#change_scene res://game/rooms/room5/room5.tscn
# 6/ character room
change_scene res://game/rooms/room6/room6.tscn
#change_scene res://game/rooms/room6/room6.tscn
# 7/ long room with camera shift to object 2 if look on object 1
# and stairs with camera shift too
#change_scene res://game/rooms/room7/room7.tscn
change_scene res://game/rooms/room7/room7.tscn

View File

@@ -14,7 +14,17 @@ Implement methods to react to inputs.
- right_click_on_item(item_global_id : String, event : InputEvent)
- left_double_click_on_item(item_global_id : String, event : InputEvent)
- left_click_on_inventory_item(inventory_item_global_id : String, event : InputEvent)
- right_click_on_inventory_item(inventory_item_global_id : String, event : InputEvent)
- left_double_click_on_inventory_item(inventory_item_global_id : String, event : InputEvent)
- inventory_item_focused(inventory_item_global_id : String)
- inventory_item_unfocused()
- open_inventory()
- close_inventory()
- mousewheel_action(direction : int)
"""
signal element_focused(element_global_id)
@@ -40,7 +50,7 @@ func left_double_click_on_bg(position : Vector2) -> void:
escoria.do("walk", ["player", position, true])
## ITEM/HOTSPOT FOCUS ##
## ITEM FOCUS ##
func element_focused(element_id : String) -> void:
#emit_signal("element_focused", element_id)