pumpkin carving

This commit is contained in:
2025-10-27 18:29:06 +01:00
parent b36923a196
commit bfd653c136
22 changed files with 296 additions and 29 deletions

View File

@@ -2,6 +2,21 @@
[ext_resource type="Script" uid="uid://b08q3lqbuoolb" path="res://scripts/autoloads/nodes/event_manager.gd" id="1_xplee"]
[sub_resource type="Animation" id="Animation_swnhv"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("ColorRect:self_modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 1, 1, 0)]
}
[sub_resource type="Animation" id="Animation_xplee"]
resource_name = "transition"
length = 0.5
@@ -18,21 +33,6 @@ tracks/0/keys = {
"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1)]
}
[sub_resource type="Animation" id="Animation_swnhv"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("ColorRect:self_modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 1, 1, 0)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_gml0k"]
_data = {
&"RESET": SubResource("Animation_swnhv"),

View File

@@ -9,6 +9,10 @@
script/source = "extends Node2D
func _ready() -> void:
if EventManager.current_event == EventManager.Events.PUMPKIN_CARVE:
var chair: StaticBody2D = $Chair
var player: Player = $Player
chair._on_interacted(player)
RenderingServer.set_default_clear_color(\"#0d0805\")
"

View File

@@ -0,0 +1,70 @@
[gd_scene load_steps=5 format=3 uid="uid://dh8wt018qxj2y"]
[ext_resource type="Script" uid="uid://b5c8ov4lhocb8" path="res://scripts/menus/pumpkin_carve.gd" id="1_vvdcc"]
[ext_resource type="Texture2D" uid="uid://cb8q0hsocixew" path="res://assets/textures/pumpkin_inner.png" id="2_fcp78"]
[ext_resource type="Texture2D" uid="uid://dk62sk18o0jhp" path="res://assets/textures/pumpkin_outer.png" id="3_0qx04"]
[sub_resource type="ImageTexture" id="ImageTexture_vvdcc"]
[node name="PumpkinCarve" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_vvdcc")
[node name="ColorRect" type="ColorRect" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
color = Color(0, 0, 0, 0.2784314)
[node name="Background" type="TextureRect" parent="."]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -80.0
offset_top = -80.0
offset_right = 80.0
offset_bottom = 80.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("2_fcp78")
[node name="DrawTexture" type="TextureRect" parent="."]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -80.0
offset_top = -80.0
offset_right = 80.0
offset_bottom = 80.0
grow_horizontal = 2
grow_vertical = 2
texture = SubResource("ImageTexture_vvdcc")
[node name="TextureRect" type="TextureRect" parent="."]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -80.0
offset_top = -80.0
offset_right = 80.0
offset_bottom = 80.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("3_0qx04")