This commit is contained in:
Rendo 2025-07-12 22:21:41 +05:00
commit 85eb5deede
5 changed files with 38 additions and 7 deletions

View file

@ -825,7 +825,7 @@ metadata/_edit_lock_ = true
[node name="RightUpperLeg" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt"]
use_parent_material = true
position = Vector2(-6, 3)
scale = Vector2(0.999834, 0.999834)
scale = Vector2(0.999835, 0.999835)
rest = Transform2D(1, 0, 0, 1, -6, 3)
editor_settings/show_bone_gizmo = false
@ -1121,7 +1121,7 @@ editor_settings/show_bone_gizmo = false
[node name="LeftHand" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm"]
position = Vector2(-1, 13)
scale = Vector2(0.999828, 0.999828)
scale = Vector2(0.999827, 0.999827)
rest = Transform2D(1, 0, 0, 1, -1, 13)
auto_calculate_length_and_angle = false
length = 6.0

View file

@ -1,8 +1,9 @@
[gd_scene load_steps=9 format=3 uid="uid://e7vutg71l6f2"]
[gd_scene load_steps=10 format=3 uid="uid://e7vutg71l6f2"]
[ext_resource type="Texture2D" uid="uid://dxyf557m4mq1p" path="res://assets/sprites/gui/EmptyPlantCard.png" id="1_77bw1"]
[ext_resource type="Texture2D" uid="uid://cabpf23ndlvx0" path="res://assets/sprites/gui/Selection.tres" id="3_q0tvq"]
[ext_resource type="Script" uid="uid://cn6ddajdtf4ep" path="res://scripts/gui/seedpackets/Seedpacket.cs" id="4_c6epd"]
[ext_resource type="Script" uid="uid://chag6sgjsjb2u" path="res://scripts/gui/seedpackets/CostVeil.cs" id="4_gtmhg"]
[ext_resource type="Shader" uid="uid://dcp5tqcec2oi3" path="res://assets/shaders/gui_masking.gdshader" id="5_s5861"]
[ext_resource type="Texture2D" uid="uid://c1afy0ga6h1ic" path="res://assets/sprites/white_box.png" id="6_lp42h"]
[ext_resource type="Script" uid="uid://ddi84kmmq1qla" path="res://scripts/gui/VeilResizer.cs" id="7_tv07f"]
@ -76,6 +77,17 @@ mouse_default_cursor_shape = 2
expand_mode = 1
stretch_mode = 5
[node name="CostVeil" type="ColorRect" parent="."]
visible = false
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.415686)
script = ExtResource("4_gtmhg")
[node name="Veil" type="TextureProgressBar" parent="." node_paths=PackedStringArray("_referenceTimer")]
material = SubResource("ShaderMaterial_qxf0q")
layout_mode = 1

View file

@ -15,9 +15,6 @@ public partial class VeilResizer : TextureProgressBar
public override void _Process(double delta)
{
if (seedpacket.Disabled && _referenceTimer.IsStopped())
Value = 1.0;
else
Value = _referenceTimer.TimeLeft / _referenceTimer.WaitTime;
Value = _referenceTimer.TimeLeft / _referenceTimer.WaitTime;
}
}

View file

@ -0,0 +1,21 @@
using Godot;
using Newlon.Components.GUI.Seedpackets;
using Newlon.Components.Level;
using System;
public partial class CostVeil : ColorRect
{
private Seedpacket packet;
public override void _Ready()
{
packet = GetParent<Seedpacket>();
}
// Called every frame. 'delta' is the elapsed time since the previous frame.
public override void _Process(double delta)
{
//Visible = RuntimeLevelData.Instance.SunCount < packet.GetResource().Cost;
Visible = packet.disablePacket;
}
}

View file

@ -0,0 +1 @@
uid://chag6sgjsjb2u