Newer
Older
DungeonShooting / DungeonShooting_Godot / prefab / box / TreasureBox0001.tscn
[gd_scene load_steps=12 format=3 uid="uid://d2gj0yuup0gdb"]

[ext_resource type="Script" path="res://src/game/activity/box/TreasureBox.cs" id="1_wxils"]
[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_l4sas"]
[ext_resource type="Texture2D" uid="uid://dladvmgql1pwe" path="res://resource/sprite/box/TreasureBox0001.png" id="3_eed5t"]

[sub_resource type="ShaderMaterial" id="ShaderMaterial_1v1is"]
resource_local_to_scene = true
shader = ExtResource("2_l4sas")
shader_parameter/blend = Color(0, 0, 0, 0.470588)
shader_parameter/schedule = 1.0
shader_parameter/modulate = Color(1, 1, 1, 1)
shader_parameter/show_outline = true
shader_parameter/outline_color = Color(0, 0, 0, 1)
shader_parameter/outline_rainbow = false
shader_parameter/outline_use_blend = true
shader_parameter/grey = 0.0

[sub_resource type="ShaderMaterial" id="ShaderMaterial_lewo8"]
resource_local_to_scene = true
shader = ExtResource("2_l4sas")
shader_parameter/blend = Color(1, 1, 1, 1)
shader_parameter/schedule = 0.0
shader_parameter/modulate = Color(1, 1, 1, 1)
shader_parameter/show_outline = true
shader_parameter/outline_color = Color(0, 0, 0, 1)
shader_parameter/outline_rainbow = false
shader_parameter/outline_use_blend = true
shader_parameter/grey = 0.0

[sub_resource type="AtlasTexture" id="AtlasTexture_hserg"]
atlas = ExtResource("3_eed5t")
region = Rect2(0, 0, 32, 32)

[sub_resource type="AtlasTexture" id="AtlasTexture_8d3br"]
atlas = ExtResource("3_eed5t")
region = Rect2(0, 0, 32, 32)

[sub_resource type="AtlasTexture" id="AtlasTexture_fp844"]
atlas = ExtResource("3_eed5t")
region = Rect2(32, 0, 32, 32)

[sub_resource type="AtlasTexture" id="AtlasTexture_151ky"]
atlas = ExtResource("3_eed5t")
region = Rect2(64, 0, 32, 32)

[sub_resource type="SpriteFrames" id="SpriteFrames_e74dc"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_hserg")
}],
"loop": false,
"name": &"default",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_8d3br")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_fp844")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_151ky")
}],
"loop": false,
"name": &"open",
"speed": 8.0
}]

[sub_resource type="RectangleShape2D" id="RectangleShape2D_j3yup"]
size = Vector2(26, 11)

[node name="TreasureBox0001" type="CharacterBody2D" node_paths=PackedStringArray("ShadowSprite", "AnimatedSprite", "Collision")]
collision_layer = 516
script = ExtResource("1_wxils")
ShadowSprite = NodePath("ShadowSprite")
AnimatedSprite = NodePath("AnimatedSprite")
Collision = NodePath("Collision")

[node name="ShadowSprite" type="Sprite2D" parent="."]
z_index = -1
material = SubResource("ShaderMaterial_1v1is")

[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."]
material = SubResource("ShaderMaterial_lewo8")
position = Vector2(0, -11)
sprite_frames = SubResource("SpriteFrames_e74dc")
animation = &"open"

[node name="Collision" type="CollisionShape2D" parent="."]
position = Vector2(0, -1.5)
shape = SubResource("RectangleShape2D_j3yup")