-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcrack.tscn
71 lines (60 loc) · 2.22 KB
/
crack.tscn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
[gd_scene load_steps=8 format=2]
[ext_resource path="res://harrypotter.gd" type="Script" id=1]
[ext_resource path="res://Collision_Trigger.gd" type="Script" id=2]
[ext_resource path="res://crack.shader" type="Shader" id=3]
[sub_resource type="ShaderMaterial" id=2]
resource_local_to_scene = true
shader = ExtResource( 3 )
shader_param/color = Plane( 0.6431, 0.5176, 0.2156, 1 )
shader_param/hi = 0.5
shader_param/lo = 0.5
[sub_resource type="Gradient" id=3]
resource_local_to_scene = true
colors = PoolColorArray( 0, 0, 0, 1, 0, 0, 0, 0 )
[sub_resource type="GradientTexture" id=4]
resource_local_to_scene = true
gradient = SubResource( 3 )
width = 500
[sub_resource type="Animation" id=5]
length = 0.5
tracks/0/type = "value"
tracks/0/path = NodePath(".:material:shader_param/hi")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.3 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ 0.5, 1.0 ]
}
tracks/1/type = "value"
tracks/1/path = NodePath(".:material:shader_param/lo")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0, 0.3 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ 0.5, 0.0 ]
}
[node name="Crack" type="Polygon2D"]
material = SubResource( 2 )
scale = Vector2( 0.5, 0.5 )
texture = SubResource( 4 )
polygon = PoolVector2Array( 0, 0, 125, 25.9137, 250, -4.98567, 375, -24.5137, 500, 0, 375, -14.5137, 250, 5.01433, 125, 35.9137 )
script = ExtResource( 1 )
[node name="Line2D" type="Line2D" parent="."]
points = PoolVector2Array( 0, 0, 500, 0 )
width = 20.0
[node name="Collision_Trigger" type="Area2D" parent="."]
script = ExtResource( 2 )
[node name="collision_polygon_area" type="CollisionPolygon2D" parent="Collision_Trigger"]
[node name="StaticBody2D" type="StaticBody2D" parent="."]
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
anims/fill = SubResource( 5 )
[connection signal="body_entered" from="Collision_Trigger" to="Collision_Trigger" method="_on_Collision_Trigger_body_entered"]
[connection signal="body_exited" from="Collision_Trigger" to="Collision_Trigger" method="_on_Collision_Trigger_body_exited"]