fix 残影特效 蓄力问题

master
chendian 1 year ago
parent 2765eab9f0
commit 4326f3c5a2

@ -7,6 +7,8 @@ uniform float alpha;
void fragment() {
vec4 col = texture(tex, UV);
if(col.a<0.5){discard;}
//col.rgb = mix(vec3(0.0), col.rgb, alpha * 0.5);
col.rgb = mix(vec3(dot(vec3(1.0), col.rgb) * 0.33333), col.rgb, alpha);
ALBEDO = col.rgb;
ALPHA = alpha;
}

@ -4,7 +4,6 @@
[resource]
resource_name = "hero01_fist_charging"
length = 0.9
step = 0.1
tracks/0/type = "value"
tracks/0/imported = false
@ -37,7 +36,7 @@ tracks/2/path = NodePath("%Battle")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0.2, 0.4, 0.6, 0.8),
"times": PackedFloat32Array(0.3, 0.5, 0.7, 0.9),
"transitions": PackedFloat32Array(1, 1, 1, 1),
"values": [{
"args": [],
@ -80,24 +79,12 @@ tracks/4/keys = {
tracks/5/type = "value"
tracks/5/imported = false
tracks/5/enabled = true
tracks/5/path = NodePath("Status:skill_move_speed")
tracks/5/path = NodePath("View:frame")
tracks/5/interp = 1
tracks/5/loop_wrap = true
tracks/5/keys = {
"times": PackedFloat32Array(0, 0.1),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [1.0, 0.0]
}
tracks/6/type = "value"
tracks/6/imported = false
tracks/6/enabled = true
tracks/6/path = NodePath("View:frame")
tracks/6/interp = 1
tracks/6/loop_wrap = true
tracks/6/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1),
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
"update": 1,
"values": [0, 1, 2, 3, 4, 5, 6, 7, 8]
"values": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
}

@ -1,4 +1,4 @@
[gd_resource type="AnimationLibrary" load_steps=47 format=3 uid="uid://croik07a1qko5"]
[gd_resource type="AnimationLibrary" load_steps=45 format=3 uid="uid://croik07a1qko5"]
[ext_resource type="Animation" uid="uid://t01a4jvp8srr" path="res://resource/skill_animation/hero01_fist_attack01.tres" id="1_4bwwm"]
[ext_resource type="Animation" uid="uid://cfapnjkj5dkws" path="res://resource/skill_animation/hero01_basic_flash.tres" id="1_46f01"]

@ -223,7 +223,7 @@ double_sided = false
alpha_cut = 2
texture_filter = 0
sprite_frames = ExtResource("21_fmv7o")
animation = &"fist_skill_charging02"
animation = &"fist_skill_charging"
[node name="Throw" type="AnimatedSprite3D" parent="EditorTool/Character"]
unique_name_in_owner = true

@ -154,7 +154,7 @@ func on_attack_miss():
func on_hold() -> void:
_frame_back(0)
_frame_back(1)
func on_check_ground(frame_offset: int) -> void:
@ -186,9 +186,9 @@ func _frame_back(frame_offset: int) -> void:
if not current_animation:
return
var frame: int = int(current_animation_position / Setting.animation_frame_rate) - frame_offset
frame = frame if frame >= 0 else 0
frame = max(0, frame)
var frame_pos: float = frame * Setting.animation_frame_rate
seek(frame_pos- Setting.animation_frame_rate / 2, true, true)
seek(frame_pos, true, true)
func on_cast_sub_character() -> void:

Loading…
Cancel
Save