From aa7bcdf8f46b47047feb64646db5ba7d6f1309dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=A8=E8=90=BD=E5=9F=BA=E5=9B=B4=E8=99=BE?= <3161880837@qq.com> Date: Sat, 24 Jan 2026 09:20:19 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=A7=92=E8=89=B2):=20=E4=B8=BA=E5=85=AC?= =?UTF-8?q?=E9=B8=A1=E8=A7=92=E8=89=B2=E6=B7=BB=E5=8A=A0=E5=A4=A7=E6=BF=80?= =?UTF-8?q?=E5=85=89=E6=AD=A6=E5=99=A8=E5=B9=B6=E8=B0=83=E6=95=B4=E6=8A=80?= =?UTF-8?q?=E8=83=BD=E5=9B=BE=E6=A0=87=E7=9D=80=E8=89=B2=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在公鸡角色中新增大激光武器 - 调整技能图标着色器参数,包括边缘高度和轨迹高度 - 移除着色器中未使用的轨迹颜色参数 - 优化粒子系统配置 --- components/Characters/Rooster.tscn | 5 ++++- components/UI/SkillIcon.tscn | 15 +++++++-------- shaders/CooldownProgress.gdshader | 13 +++++++------ 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/components/Characters/Rooster.tscn b/components/Characters/Rooster.tscn index 789c4f1..ce2e95a 100644 --- a/components/Characters/Rooster.tscn +++ b/components/Characters/Rooster.tscn @@ -1,8 +1,9 @@ -[gd_scene load_steps=13 format=3 uid="uid://bm7ymrri6pykb"] +[gd_scene load_steps=14 format=3 uid="uid://bm7ymrri6pykb"] [ext_resource type="PackedScene" uid="uid://cvogxi7mktumf" path="res://components/Abstracts/EntityBase.tscn" id="1_e5pl8"] [ext_resource type="Script" uid="uid://cthtupc6dtbav" path="res://scripts/Contents/Characters/Rooster.gd" id="2_oqdqd"] [ext_resource type="PackedScene" uid="uid://c0n3igy4hucrg" path="res://components/Weapons/PurpleCrystal.tscn" id="3_da2ca"] +[ext_resource type="PackedScene" uid="uid://cxabqjo7skxev" path="res://components/Weapons/BigLaser.tscn" id="4_0omr3"] [ext_resource type="AudioStream" uid="uid://cdrevrq7n6yqa" path="res://resources/sounds/effect/Boing.mp3" id="4_66s6c"] [ext_resource type="AudioStream" uid="uid://benyec5bqni0b" path="res://resources/sounds/effect/Chomp.wav" id="4_k0yme"] [ext_resource type="AudioStream" uid="uid://dmxh3bpk8vyy5" path="res://resources/sounds/effect/Coin.mp3" id="5_xnbhq"] @@ -60,6 +61,8 @@ process_mode = 4 [node name="PurpleCrystal" parent="weaponStore" index="0" instance=ExtResource("3_da2ca")] +[node name="BigLaser" parent="weaponStore" index="1" instance=ExtResource("4_0omr3")] + [node name="sprint" parent="sounds" index="0"] stream = ExtResource("4_66s6c") diff --git a/components/UI/SkillIcon.tscn b/components/UI/SkillIcon.tscn index 67e8c78..ed89342 100644 --- a/components/UI/SkillIcon.tscn +++ b/components/UI/SkillIcon.tscn @@ -1,18 +1,17 @@ [gd_scene load_steps=12 format=3 uid="uid://ufl4kek8hrmt"] -[ext_resource type="Shader" path="res://shaders/CooldownProgress.gdshader" id="1_jaivk"] -[ext_resource type="Script" path="res://scripts/Statemachine/SkillIcon.gd" id="1_l7say"] +[ext_resource type="Shader" uid="uid://u6weu6llk46k" path="res://shaders/CooldownProgress.gdshader" id="1_jaivk"] +[ext_resource type="Script" uid="uid://bp8catom6i0ul" path="res://scripts/Statemachine/SkillIcon.gd" id="1_l7say"] [ext_resource type="Texture2D" uid="uid://cp4ypuarjoshp" path="res://resources/skillIcons/purple-crystal.png" id="2_hh1bl"] [ext_resource type="Texture2D" uid="uid://chqmaeivt84b5" path="res://resources/common/attackstar.svg" id="4_50rim"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_3fyf3"] shader = ExtResource("1_jaivk") shader_parameter/progress = 0.5 -shader_parameter/backAlpha = 0.2 -shader_parameter/edgeHeight = 0.05 +shader_parameter/backAlpha = 0.0 +shader_parameter/edgeHeight = 0.06 shader_parameter/edgeColor = Color(1, 1, 1, 1) -shader_parameter/trailHeight = 0.3 -shader_parameter/trailColor = Color(1, 1, 1, 0.5) +shader_parameter/trailHeight = 0.4 [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_a60wd"] content_margin_left = 5.0 @@ -33,7 +32,7 @@ point_count = 3 curve = SubResource("Curve_rgp6n") [sub_resource type="Curve" id="Curve_h7g2c"] -max_value = 2.0 +_limits = [0.0, 2.0, 0.0, 1.0] _data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(1, 2), 0.0, 0.0, 0, 0] point_count = 2 @@ -69,6 +68,6 @@ unique_name_in_owner = true position = Vector2(20, 20) emitting = false amount = 1 -process_material = SubResource("ParticleProcessMaterial_7cgpa") texture = ExtResource("4_50rim") one_shot = true +process_material = SubResource("ParticleProcessMaterial_7cgpa") diff --git a/shaders/CooldownProgress.gdshader b/shaders/CooldownProgress.gdshader index e980d16..99d4956 100644 --- a/shaders/CooldownProgress.gdshader +++ b/shaders/CooldownProgress.gdshader @@ -1,15 +1,16 @@ shader_type canvas_item; uniform float progress:hint_range(-0.0, 2.0, 0.01)=0.5; uniform float backAlpha:hint_range(0.0, 1.0, 0.01)=0.1; -uniform float edgeHeight:hint_range(0.0, 1.0, 0.01)=0.05; +uniform float edgeHeight:hint_range(0.0, 1.0, 0.01)=0.06; uniform vec4 edgeColor:source_color; -uniform float trailHeight:hint_range(0.0, 1.0, 0.01)=0.3; -uniform vec4 trailColor:source_color; +uniform float trailHeight:hint_range(0.0, 1.0, 0.01)=0.4; void fragment() { if(UV.y>=1.0-progress){ - if(1.0-progress+trailHeight-UV.y>0.0){ - float dist=distance(UV.y,1.0-progress); - COLOR=mix(COLOR,trailColor*vec4(1,1,1,(trailHeight-dist)/trailHeight),1); + if(distance(UV,vec2(0.5,0.5))>0.5-edgeHeight){ + COLOR=vec4(1,1,1,1); + }else if(1.0-progress+trailHeight-UV.y>0.0){ + float dist=UV.y-(1.0-progress); + COLOR=vec4(1,1,1,(trailHeight-dist)/trailHeight*0.8); }else{ COLOR.a*=backAlpha; }