Files
ai-game-2/scenes/healers/healers.tscn
2024-07-01 08:24:25 -07:00

326 lines
11 KiB
Plaintext

[gd_scene load_steps=26 format=3 uid="uid://dpsa6s5erb0ws"]
[ext_resource type="Script" path="res://SetPiece_.gd" id="2_j681b"]
[ext_resource type="Script" path="res://ScalePoint_.gd" id="3_eyrgf"]
[ext_resource type="Texture2D" uid="uid://bj44850m5xlfn" path="res://scenes/healers/image6.png" id="4_kylj3"]
[ext_resource type="Texture2D" uid="uid://cc32vj8gx56iv" path="res://scenes/healers/rocks.png" id="5_45r0t"]
[ext_resource type="Texture2D" uid="uid://5ooe4wjgrsl1" path="res://spray.png" id="6_3rr0a"]
[ext_resource type="Texture2D" uid="uid://hsahcj384qh4" path="res://scenes/healers/New Folder/out_00002_.png" id="7_5xrvq"]
[ext_resource type="Texture2D" uid="uid://dve32x58w3q1v" path="res://scenes/healers/New Folder/out_00003_.png" id="8_oiofj"]
[ext_resource type="Texture2D" uid="uid://be2x51etmxtqn" path="res://scenes/healers/New Folder/out_00004_.png" id="9_nm1dp"]
[ext_resource type="Texture2D" uid="uid://b0wbfwyk70h1i" path="res://scenes/healers/New Folder/out_00005_.png" id="10_tjkh8"]
[ext_resource type="Texture2D" uid="uid://d3er3v8xwplu0" path="res://scenes/healers/New Folder/out_00006_.png" id="11_qwoyh"]
[ext_resource type="Texture2D" uid="uid://gtcrw1fo1bcv" path="res://scenes/healers/New Folder/out_00007_.png" id="12_cdqxp"]
[ext_resource type="Texture2D" uid="uid://hkfq4dx4wbtu" path="res://scenes/healers/New Folder/out_00008_.png" id="13_a08cl"]
[ext_resource type="Texture2D" uid="uid://bf47oke85kjti" path="res://scenes/healers/New Folder/out_00009_.png" id="14_8u0o0"]
[ext_resource type="Texture2D" uid="uid://b41bmarvyd3td" path="res://scenes/healers/New Folder/out_00010_.png" id="15_j0app"]
[ext_resource type="Texture2D" uid="uid://fj1h0ywepx08" path="res://scenes/healers/New Folder/out_00011_.png" id="16_4a0fq"]
[ext_resource type="Texture2D" uid="uid://c7uulvgn8wsga" path="res://scenes/healers/goat.png" id="17_i0x0u"]
[ext_resource type="PackedScene" uid="uid://c4vc1wx7k6cw" path="res://TransitionPiece.tscn" id="17_wwn3l"]
[sub_resource type="GDScript" id="GDScript_bel53"]
script/source = "extends Scene
# Declare member variables here. Examples:
# var a = 2
# var b = \"text\"
signal entered_from_pasture
var target: Vector2
# Called when the node enters the scene tree for the first time.
func _ready():
super()
pass # Replace with function body.
func _process(delta):
super(delta)
var cam = get_viewport().get_camera_2d()
#if target:
#
#cam.global_position = $SetPiece/thingpoint.global_position #+= ($SetPiece/thingpoint.global_position - cam.global_position).normalized() * 5000.0 * delta
#cam.zoom = lerp(cam.zoom, Vector2(1.5, 1.5), 1.15 * delta)
#else:
#cam.position=Vector2(0,0)
#super(delta)
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass
func _on_set_piece_interacted():
#$target = $SetPiece/thingpoint.global_position
#$ThingCamera.enabled=true
#$ThingCamera.make_current()
var path = NavigationServer2D.map_get_path(self.map, self.pathfind.to_local(self.ego.global_position), pathfind.to_local($\"look-at-thing-point\".global_position), true)
start_main_script(ScriptBuilder.init(ScriptBuilder.walk_path(self.ego, path))
.and_then(ScriptBuilder.switch_camera(\"ThingCamera\"))
.and_then(ScriptBuilder.say(self.ego, \"Look at the cute goat!\"))
.and_then(ScriptBuilder.reset_camera())
#.and_then(ScriptBuilder.transition(self, pasture, \"healers-exit-point\"))
#.and_then(ScriptBuilder.walk_to_deferred(\"healers-exit-point\", \"healers-entrance-point\"))
.build(self, \"_on_script_complete\"))
#$AnimationPlayer.play(\"focus_thing\")
func _on_pasture_interacted():
$pasture.default_script(self)
func _on_pit_interacted():
$pit.default_script(self)
func _on_healer_interior_interacted():
$healer_interior.default_script(self)
"
[sub_resource type="NavigationPolygon" id="NavigationPolygon_dvbx8"]
vertices = PackedVector2Array(507, 1007, 750, 1048, 626, 1104, 383, 1138, 392, 1082, 599, 876, 555, 821, 587, 818, 702, 879, 216, 1112, -194, 1093, -112, 892, 593, 887, 516, 951, 2276, 970, 2275, 1173, 1043, 958, 912, 915, 809, 968, 850, 885)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3, 4), PackedInt32Array(5, 6, 7, 8), PackedInt32Array(9, 10, 11, 12, 13), PackedInt32Array(14, 15, 16, 17), PackedInt32Array(17, 16, 18), PackedInt32Array(8, 19, 17, 18, 13, 12), PackedInt32Array(12, 5, 8), PackedInt32Array(4, 9, 13, 0)])
outlines = Array[PackedVector2Array]([PackedVector2Array(-119, 883, -209, 1103, 218, 1123, 507, 1072, 524, 962, 809, 979, 1042, 968, 2285, 1186, 2287, 961, 914, 905, 853, 876, 705, 869, 590, 808, 536, 813, 587, 877), PackedVector2Array(400, 979, 371, 1150, 629, 1114, 784, 1044, 388, 977)])
source_geometry_group_name = &"navigation_polygon_source_group"
[sub_resource type="Animation" id="Animation_ij55e"]
resource_name = "focus_thing"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("camera.position.x")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 1),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [null, null]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_cuet8"]
_data = {
"focus_thing": SubResource("Animation_ij55e")
}
[sub_resource type="SpriteFrames" id="SpriteFrames_7un2n"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": ExtResource("7_5xrvq")
}, {
"duration": 1.0,
"texture": ExtResource("8_oiofj")
}, {
"duration": 1.0,
"texture": ExtResource("9_nm1dp")
}, {
"duration": 1.0,
"texture": ExtResource("10_tjkh8")
}, {
"duration": 1.0,
"texture": ExtResource("11_qwoyh")
}, {
"duration": 1.0,
"texture": ExtResource("12_cdqxp")
}, {
"duration": 1.0,
"texture": ExtResource("13_a08cl")
}, {
"duration": 1.0,
"texture": ExtResource("14_8u0o0")
}, {
"duration": 1.0,
"texture": ExtResource("15_j0app")
}, {
"duration": 1.0,
"texture": ExtResource("16_4a0fq")
}],
"loop": true,
"name": &"default",
"speed": 10.0
}]
[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_0pokw"]
blend_mode = 1
[sub_resource type="Gradient" id="Gradient_admud"]
colors = PackedColorArray(1, 1, 1, 0.309804, 1, 1, 1, 0)
[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_2xtme"]
blend_mode = 1
[node name="background" type="Node2D"]
y_sort_enabled = true
script = SubResource("GDScript_bel53")
[node name="SetPiece" type="Polygon2D" parent="." groups=["set-piece"]]
position = Vector2(78, 6)
polygon = PackedVector2Array(1469, 886, 1460, 1102, 1787, 1042, 1744, 843)
script = ExtResource("2_j681b")
label = "Cute little goat"
[node name="thingpoint" type="Node2D" parent="SetPiece"]
position = Vector2(1635, 1005)
[node name="StartScalePoint" type="Node2D" parent="."]
position = Vector2(1476, 742)
script = ExtResource("3_eyrgf")
target_scale = 0.135
[node name="EndScalePoint" type="Node2D" parent="."]
position = Vector2(1408, 1097)
scale = Vector2(0.44, 0.44)
script = ExtResource("3_eyrgf")
target_scale = 0.425
[node name="bg" type="Sprite2D" parent="."]
scale = Vector2(1.27, 1.27)
texture = ExtResource("4_kylj3")
centered = false
metadata/_edit_lock_ = true
[node name="pathfind" type="NavigationRegion2D" parent="."]
navigation_polygon = SubResource("NavigationPolygon_dvbx8")
[node name="Rocks" type="Sprite2D" parent="."]
position = Vector2(762, 1008)
rotation = -6.28318
scale = Vector2(1.27, 1.27)
texture = ExtResource("5_45r0t")
offset = Vector2(-3.93726, -33.8582)
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_cuet8")
}
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
position = Vector2(1090, 722)
scale = Vector2(1.27, 1.27)
sprite_frames = SubResource("SpriteFrames_7un2n")
autoplay = "default"
frame_progress = 0.601273
[node name="CPUParticles2D" type="CPUParticles2D" parent="."]
modulate = Color(1, 1, 1, 0.0823529)
material = SubResource("CanvasItemMaterial_0pokw")
position = Vector2(1255, 752)
amount = 35
lifetime = 2.55
lifetime_randomness = 0.04
local_coords = true
texture = ExtResource("6_3rr0a")
emission_shape = 3
emission_rect_extents = Vector2(45.235, 1)
direction = Vector2(0, -13.92)
spread = 94.88
gravity = Vector2(0, -5.455)
initial_velocity_min = 24.33
initial_velocity_max = 73.42
damping_min = 62.21
damping_max = 62.21
scale_amount_min = 0.1
scale_amount_max = 2.0
color_ramp = SubResource("Gradient_admud")
[node name="CPUParticles2D2" type="CPUParticles2D" parent="."]
modulate = Color(1, 1, 1, 0.0823529)
position = Vector2(1694, 741)
amount = 37
local_coords = true
texture = ExtResource("6_3rr0a")
emission_shape = 3
emission_rect_extents = Vector2(45.235, 1)
direction = Vector2(0, -13.92)
spread = 94.88
gravity = Vector2(0, -5.455)
initial_velocity_min = 83.45
initial_velocity_max = 83.45
damping_min = 0.365
damping_max = 0.365
color_ramp = SubResource("Gradient_admud")
[node name="CPUParticles2D3" type="CPUParticles2D" parent="."]
modulate = Color(1, 1, 1, 0.0823529)
material = SubResource("CanvasItemMaterial_2xtme")
position = Vector2(1221, 529)
scale = Vector2(1.78, 1.78)
amount = 14
local_coords = true
texture = ExtResource("6_3rr0a")
emission_shape = 3
emission_rect_extents = Vector2(45.235, 1)
direction = Vector2(0, -13.92)
spread = 94.88
gravity = Vector2(0, -5.455)
initial_velocity_min = 21.65
initial_velocity_max = 21.65
damping_min = 0.365
damping_max = 0.365
color_ramp = SubResource("Gradient_admud")
[node name="ThingCamera" type="Camera2D" parent="."]
position = Vector2(1150, 674)
zoom = Vector2(1.095, 1.095)
[node name="look-at-thing-point" type="Node2D" parent="."]
position = Vector2(886, 941)
[node name="Goat" type="Sprite2D" parent="."]
position = Vector2(1727, 969)
scale = Vector2(-0.362, 0.338)
texture = ExtResource("17_i0x0u")
[node name="pasture" parent="." instance=ExtResource("17_wwn3l")]
polygon = PackedVector2Array(-209, 888, -209, 1180, 220, 1090, 172, 830)
target_transition = "healers"
target = "res://scenes/healer_pasture/healer_pasture.tscn"
label = "Pasture"
[node name="entrance" parent="pasture" index="0"]
position = Vector2(98, 983)
[node name="exit" parent="pasture" index="1"]
position = Vector2(-126, 1005)
[node name="pit" parent="." instance=ExtResource("17_wwn3l")]
polygon = PackedVector2Array(1976, 896, 1916, 1246, 2480, 1299, 2389, 938)
target_transition = "healers"
target = "res://scenes/pit/pit.tscn"
label = "Pit"
[node name="entrance" parent="pit" index="0"]
position = Vector2(2007, 1047)
[node name="exit" parent="pit" index="1"]
position = Vector2(2226, 1075)
[node name="healer_interior" parent="." instance=ExtResource("17_wwn3l")]
position = Vector2(78, 6)
color = Color(1, 1, 1, 0.27451)
polygon = PackedVector2Array(344, 556, 296, 818, 614, 885, 735, 751, 636, 561)
target_transition = "healers"
target = "res://scenes/healer_interior/healer_interior.tscn"
label = "Inside"
[node name="entrance" parent="healer_interior" index="0"]
position = Vector2(550, 862)
[node name="exit" parent="healer_interior" index="1"]
position = Vector2(497, 818)
[connection signal="entered_from_pasture" from="." to="." method="_on_entered_from_pasture"]
[connection signal="interacted" from="SetPiece" to="." method="_on_set_piece_interacted"]
[connection signal="interacted" from="pasture" to="." method="_on_pasture_interacted"]
[connection signal="interacted" from="pit" to="." method="_on_pit_interacted"]
[connection signal="interacted" from="healer_interior" to="." method="_on_healer_interior_interacted"]
[editable path="pasture"]
[editable path="pit"]
[editable path="healer_interior"]