残影 通用化

master
chendian 1 year ago
parent b9a14dd164
commit 2765eab9f0

@ -0,0 +1,10 @@
[gd_resource type="ShaderMaterial" load_steps=3 format=3 uid="uid://buvopacbd0w10"]
[ext_resource type="Shader" path="res://render/shader/after_image.gdshader" id="1_4dpfm"]
[ext_resource type="Texture2D" uid="uid://b6bfacouwy2hi" path="res://render/texture/decal/decal_glow.png" id="2_xruib"]
[resource]
render_priority = 0
shader = ExtResource("1_4dpfm")
shader_parameter/alpha = 1.0
shader_parameter/tex = ExtResource("2_xruib")

@ -0,0 +1,12 @@
shader_type spatial;
render_mode unshaded;
uniform sampler2D tex : source_color;
uniform float alpha;
void fragment() {
vec4 col = texture(tex, UV);
if(col.a<0.5){discard;}
ALBEDO = col.rgb;
ALPHA = alpha;
}

@ -73,69 +73,46 @@ tracks/5/path = NodePath("Effect")
tracks/5/interp = 1 tracks/5/interp = 1
tracks/5/loop_wrap = true tracks/5/loop_wrap = true
tracks/5/keys = { tracks/5/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3), "times": PackedFloat32Array(0.1),
"transitions": PackedFloat32Array(1, 1, 1, 1), "transitions": PackedFloat32Array(1),
"values": [{ "values": [{
"args": [], "args": [],
"method": &"cast_after_image" "method": &"cast_attack_particle1"
}, {
"args": [],
"method": &"cast_after_image"
}, {
"args": [],
"method": &"cast_after_image"
}, {
"args": [],
"method": &"cast_after_image"
}] }]
} }
tracks/6/type = "method" tracks/6/type = "method"
tracks/6/imported = false tracks/6/imported = false
tracks/6/enabled = true tracks/6/enabled = true
tracks/6/path = NodePath("Effect") tracks/6/path = NodePath("Battle")
tracks/6/interp = 1 tracks/6/interp = 1
tracks/6/loop_wrap = true tracks/6/loop_wrap = true
tracks/6/keys = { tracks/6/keys = {
"times": PackedFloat32Array(0.1), "times": PackedFloat32Array(0.3),
"transitions": PackedFloat32Array(1), "transitions": PackedFloat32Array(1),
"values": [{ "values": [{
"args": [], "args": [],
"method": &"cast_attack_particle1" "method": &"stop"
}] }]
} }
tracks/7/type = "method" tracks/7/type = "value"
tracks/7/imported = false tracks/7/imported = false
tracks/7/enabled = true tracks/7/enabled = true
tracks/7/path = NodePath("Battle") tracks/7/path = NodePath("Status:is_speed_y_freeze")
tracks/7/interp = 1 tracks/7/interp = 1
tracks/7/loop_wrap = true tracks/7/loop_wrap = true
tracks/7/keys = { tracks/7/keys = {
"times": PackedFloat32Array(0.3), "times": PackedFloat32Array(0, 0.3),
"transitions": PackedFloat32Array(1), "transitions": PackedFloat32Array(1, 1),
"values": [{ "update": 1,
"args": [], "values": [true, false]
"method": &"stop"
}]
} }
tracks/8/type = "value" tracks/8/type = "value"
tracks/8/imported = false tracks/8/imported = false
tracks/8/enabled = true tracks/8/enabled = true
tracks/8/path = NodePath("Status:is_speed_y_freeze") tracks/8/path = NodePath("View:frame")
tracks/8/interp = 1 tracks/8/interp = 1
tracks/8/loop_wrap = true tracks/8/loop_wrap = true
tracks/8/keys = { tracks/8/keys = {
"times": PackedFloat32Array(0, 0.3),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [true, false]
}
tracks/9/type = "value"
tracks/9/imported = false
tracks/9/enabled = true
tracks/9/path = NodePath("View:frame")
tracks/9/interp = 1
tracks/9/loop_wrap = true
tracks/9/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7), "times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1), "transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1),
"update": 1, "update": 1,

@ -73,69 +73,46 @@ tracks/5/path = NodePath("Effect")
tracks/5/interp = 1 tracks/5/interp = 1
tracks/5/loop_wrap = true tracks/5/loop_wrap = true
tracks/5/keys = { tracks/5/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3), "times": PackedFloat32Array(0.1),
"transitions": PackedFloat32Array(1, 1, 1, 1), "transitions": PackedFloat32Array(1),
"values": [{ "values": [{
"args": [], "args": [],
"method": &"cast_after_image" "method": &"cast_attack_particle1"
}, {
"args": [],
"method": &"cast_after_image"
}, {
"args": [],
"method": &"cast_after_image"
}, {
"args": [],
"method": &"cast_after_image"
}] }]
} }
tracks/6/type = "method" tracks/6/type = "method"
tracks/6/imported = false tracks/6/imported = false
tracks/6/enabled = true tracks/6/enabled = true
tracks/6/path = NodePath("Effect") tracks/6/path = NodePath("Battle")
tracks/6/interp = 1 tracks/6/interp = 1
tracks/6/loop_wrap = true tracks/6/loop_wrap = true
tracks/6/keys = { tracks/6/keys = {
"times": PackedFloat32Array(0.1), "times": PackedFloat32Array(0.3),
"transitions": PackedFloat32Array(1), "transitions": PackedFloat32Array(1),
"values": [{ "values": [{
"args": [], "args": [],
"method": &"cast_attack_particle1" "method": &"stop"
}] }]
} }
tracks/7/type = "method" tracks/7/type = "value"
tracks/7/imported = false tracks/7/imported = false
tracks/7/enabled = true tracks/7/enabled = false
tracks/7/path = NodePath("Battle") tracks/7/path = NodePath("Status:is_speed_y_freeze")
tracks/7/interp = 1 tracks/7/interp = 1
tracks/7/loop_wrap = true tracks/7/loop_wrap = true
tracks/7/keys = { tracks/7/keys = {
"times": PackedFloat32Array(0.3), "times": PackedFloat32Array(0, 0.3),
"transitions": PackedFloat32Array(1), "transitions": PackedFloat32Array(1, 1),
"values": [{ "update": 1,
"args": [], "values": [true, false]
"method": &"stop"
}]
} }
tracks/8/type = "value" tracks/8/type = "value"
tracks/8/imported = false tracks/8/imported = false
tracks/8/enabled = false tracks/8/enabled = true
tracks/8/path = NodePath("Status:is_speed_y_freeze") tracks/8/path = NodePath("View:frame")
tracks/8/interp = 1 tracks/8/interp = 1
tracks/8/loop_wrap = true tracks/8/loop_wrap = true
tracks/8/keys = { tracks/8/keys = {
"times": PackedFloat32Array(0, 0.3),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [true, false]
}
tracks/9/type = "value"
tracks/9/imported = false
tracks/9/enabled = true
tracks/9/path = NodePath("View:frame")
tracks/9/interp = 1
tracks/9/loop_wrap = true
tracks/9/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7), "times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1), "transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1),
"update": 1, "update": 1,

@ -93,36 +93,13 @@ tracks/6/keys = {
"method": &"cast_attack_particle1" "method": &"cast_attack_particle1"
}] }]
} }
tracks/7/type = "method" tracks/7/type = "value"
tracks/7/imported = false tracks/7/imported = false
tracks/7/enabled = true tracks/7/enabled = true
tracks/7/path = NodePath("Effect") tracks/7/path = NodePath("View:frame")
tracks/7/interp = 1 tracks/7/interp = 1
tracks/7/loop_wrap = true tracks/7/loop_wrap = true
tracks/7/keys = { tracks/7/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3),
"transitions": PackedFloat32Array(1, 1, 1, 1),
"values": [{
"args": [],
"method": &"cast_after_image"
}, {
"args": [],
"method": &"cast_after_image"
}, {
"args": [],
"method": &"cast_after_image"
}, {
"args": [],
"method": &"cast_after_image"
}]
}
tracks/8/type = "value"
tracks/8/imported = false
tracks/8/enabled = true
tracks/8/path = NodePath("View:frame")
tracks/8/interp = 1
tracks/8/loop_wrap = true
tracks/8/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1, 1.1, 1.2), "times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1, 1.1, 1.2),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), "transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
"update": 1, "update": 1,

@ -96,54 +96,34 @@ tracks/6/path = NodePath("Effect")
tracks/6/interp = 1 tracks/6/interp = 1
tracks/6/loop_wrap = true tracks/6/loop_wrap = true
tracks/6/keys = { tracks/6/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2), "times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1, 1, 1), "transitions": PackedFloat32Array(1),
"values": [{ "values": [{
"args": [], "args": [],
"method": &"cast_after_image" "method": &"cast_attack_particle1"
}, {
"args": [],
"method": &"cast_after_image"
}, {
"args": [],
"method": &"cast_after_image"
}] }]
} }
tracks/7/type = "method" tracks/7/type = "method"
tracks/7/imported = false tracks/7/imported = false
tracks/7/enabled = true tracks/7/enabled = true
tracks/7/path = NodePath("Effect") tracks/7/path = NodePath("Battle")
tracks/7/interp = 1 tracks/7/interp = 1
tracks/7/loop_wrap = true tracks/7/loop_wrap = true
tracks/7/keys = { tracks/7/keys = {
"times": PackedFloat32Array(0), "times": PackedFloat32Array(0.3),
"transitions": PackedFloat32Array(1), "transitions": PackedFloat32Array(1),
"values": [{ "values": [{
"args": [], "args": [],
"method": &"cast_attack_particle1" "method": &"stop"
}] }]
} }
tracks/8/type = "method" tracks/8/type = "value"
tracks/8/imported = false tracks/8/imported = false
tracks/8/enabled = true tracks/8/enabled = true
tracks/8/path = NodePath("Battle") tracks/8/path = NodePath("View:frame")
tracks/8/interp = 1 tracks/8/interp = 1
tracks/8/loop_wrap = true tracks/8/loop_wrap = true
tracks/8/keys = { tracks/8/keys = {
"times": PackedFloat32Array(0.3),
"transitions": PackedFloat32Array(1),
"values": [{
"args": [],
"method": &"stop"
}]
}
tracks/9/type = "value"
tracks/9/imported = false
tracks/9/enabled = true
tracks/9/path = NodePath("View:frame")
tracks/9/interp = 1
tracks/9/loop_wrap = true
tracks/9/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8), "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), "transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1),
"update": 1, "update": 1,

@ -1,43 +0,0 @@
[gd_resource type="Animation" load_steps=2 format=3 uid="uid://j1o3tdfew2qw"]
[ext_resource type="SpriteFrames" uid="uid://jpxh0jr8wp8g" path="res://resource/animation/character/hero01_basic.aseprite" id="1_eoekm"]
[resource]
resource_name = "hero01_flash"
length = 0.8
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("View:sprite_frames")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [ExtResource("1_eoekm")]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("View:animation")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": ["basic_flash"]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("View:frame")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1),
"update": 1,
"values": [0, 1, 2, 3, 4, 5, 6, 7]
}

@ -1,143 +0,0 @@
[gd_resource type="Animation" load_steps=2 format=3 uid="uid://cwm116apu63n1"]
[ext_resource type="SpriteFrames" uid="uid://dhfqj1dxldqao" path="res://resource/animation/character/hero01_long_skill01.aseprite" id="2_3eu5o"]
[resource]
resource_name = "hero01_long_flash"
length = 0.8
step = 0.1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("View:sprite_frames")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [ExtResource("2_3eu5o")]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("View:animation")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": ["long_flash"]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Status:break_level")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0, 0.2, 0.3),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 1,
"values": [0, 3, 4]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("Status:speed_up_rate")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0, 0.3),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [0.0, 0.0]
}
tracks/4/type = "value"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath("Status:skill_move_speed")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
"times": PackedFloat32Array(0.1, 0.3),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [8.0, 0.0]
}
tracks/5/type = "method"
tracks/5/imported = false
tracks/5/enabled = true
tracks/5/path = NodePath("Effect")
tracks/5/interp = 1
tracks/5/loop_wrap = true
tracks/5/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3),
"transitions": PackedFloat32Array(1, 1, 1, 1),
"values": [{
"args": [],
"method": &"cast_after_image"
}, {
"args": [],
"method": &"cast_after_image"
}, {
"args": [],
"method": &"cast_after_image"
}, {
"args": [],
"method": &"cast_after_image"
}]
}
tracks/6/type = "method"
tracks/6/imported = false
tracks/6/enabled = true
tracks/6/path = NodePath("Effect")
tracks/6/interp = 1
tracks/6/loop_wrap = true
tracks/6/keys = {
"times": PackedFloat32Array(0.1),
"transitions": PackedFloat32Array(1),
"values": [{
"args": [],
"method": &"cast_attack_particle1"
}]
}
tracks/7/type = "method"
tracks/7/imported = false
tracks/7/enabled = true
tracks/7/path = NodePath("Battle")
tracks/7/interp = 1
tracks/7/loop_wrap = true
tracks/7/keys = {
"times": PackedFloat32Array(0.3),
"transitions": PackedFloat32Array(1),
"values": [{
"args": [],
"method": &"stop"
}]
}
tracks/8/type = "value"
tracks/8/imported = false
tracks/8/enabled = true
tracks/8/path = NodePath("Status:is_speed_y_freeze")
tracks/8/interp = 1
tracks/8/loop_wrap = true
tracks/8/keys = {
"times": PackedFloat32Array(0, 0.3),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [true, false]
}
tracks/9/type = "value"
tracks/9/imported = false
tracks/9/enabled = true
tracks/9/path = NodePath("View:frame")
tracks/9/interp = 1
tracks/9/loop_wrap = true
tracks/9/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1),
"update": 1,
"values": [0, 1, 2, 3, 4, 5, 6, 7]
}

@ -22,7 +22,6 @@
[ext_resource type="Animation" uid="uid://cvxifa2uac5oc" path="res://resource/skill_animation/hero01_combo0102.tres" id="4_dc8mt"] [ext_resource type="Animation" uid="uid://cvxifa2uac5oc" path="res://resource/skill_animation/hero01_combo0102.tres" id="4_dc8mt"]
[ext_resource type="Animation" uid="uid://dkkqys8el1u6g" path="res://resource/skill_animation/hero01_common_skill02.tres" id="4_vtwy2"] [ext_resource type="Animation" uid="uid://dkkqys8el1u6g" path="res://resource/skill_animation/hero01_common_skill02.tres" id="4_vtwy2"]
[ext_resource type="Animation" uid="uid://dxgqn5fa7aokj" path="res://resource/skill_animation/hero01_fist_air_skill01.tres" id="5_df32u"] [ext_resource type="Animation" uid="uid://dxgqn5fa7aokj" path="res://resource/skill_animation/hero01_fist_air_skill01.tres" id="5_df32u"]
[ext_resource type="Animation" uid="uid://cwm116apu63n1" path="res://resource/skill_animation/hero01_long_flash.tres" id="5_fumom"]
[ext_resource type="Animation" uid="uid://bjnkrte7660pt" path="res://resource/skill_animation/hero01_long_skill01.tres" id="5_kt0qw"] [ext_resource type="Animation" uid="uid://bjnkrte7660pt" path="res://resource/skill_animation/hero01_long_skill01.tres" id="5_kt0qw"]
[ext_resource type="Animation" uid="uid://cqc30d5uqi2my" path="res://resource/skill_animation/hero01_combo0103.tres" id="5_o144c"] [ext_resource type="Animation" uid="uid://cqc30d5uqi2my" path="res://resource/skill_animation/hero01_combo0103.tres" id="5_o144c"]
[ext_resource type="Animation" uid="uid://d1f7iluo8ejne" path="res://resource/skill_animation/hero01_common_skill03.tres" id="7_05hi3"] [ext_resource type="Animation" uid="uid://d1f7iluo8ejne" path="res://resource/skill_animation/hero01_common_skill03.tres" id="7_05hi3"]
@ -34,7 +33,6 @@
[ext_resource type="Animation" uid="uid://xfuwfwtw4cna" path="res://resource/skill_animation/hero01_short_attack02.tres" id="11_h2vlt"] [ext_resource type="Animation" uid="uid://xfuwfwtw4cna" path="res://resource/skill_animation/hero01_short_attack02.tres" id="11_h2vlt"]
[ext_resource type="Animation" uid="uid://bdyjvq185tdk6" path="res://resource/skill_animation/hero01_short_attack03.tres" id="11_kejyu"] [ext_resource type="Animation" uid="uid://bdyjvq185tdk6" path="res://resource/skill_animation/hero01_short_attack03.tres" id="11_kejyu"]
[ext_resource type="Animation" uid="uid://bkre61dn64j2f" path="res://resource/skill_animation/hero01_short_attack01.tres" id="11_n0dhn"] [ext_resource type="Animation" uid="uid://bkre61dn64j2f" path="res://resource/skill_animation/hero01_short_attack01.tres" id="11_n0dhn"]
[ext_resource type="Animation" uid="uid://j1o3tdfew2qw" path="res://resource/skill_animation/hero01_flash.tres" id="16_ctotk"]
[ext_resource type="Animation" uid="uid://uxuayi0qf3b7" path="res://resource/skill_animation/hero01_long_air_skill01.tres" id="20_0ey8y"] [ext_resource type="Animation" uid="uid://uxuayi0qf3b7" path="res://resource/skill_animation/hero01_long_air_skill01.tres" id="20_0ey8y"]
[ext_resource type="Animation" uid="uid://batvpnk7jfc2a" path="res://resource/skill_animation/hero01_fist_skill02.tres" id="20_dv6vj"] [ext_resource type="Animation" uid="uid://batvpnk7jfc2a" path="res://resource/skill_animation/hero01_fist_skill02.tres" id="20_dv6vj"]
[ext_resource type="Animation" uid="uid://cj0lnanjp7xfo" path="res://resource/skill_animation/hero01_fist_skill01.tres" id="20_xaont"] [ext_resource type="Animation" uid="uid://cj0lnanjp7xfo" path="res://resource/skill_animation/hero01_fist_skill01.tres" id="20_xaont"]
@ -74,7 +72,6 @@ _data = {
"hero01_fist_skill_charging": ExtResource("1_nd54y"), "hero01_fist_skill_charging": ExtResource("1_nd54y"),
"hero01_fist_skill_charging01": ExtResource("23_12bpf"), "hero01_fist_skill_charging01": ExtResource("23_12bpf"),
"hero01_fist_skill_charging02": ExtResource("24_j0oqq"), "hero01_fist_skill_charging02": ExtResource("24_j0oqq"),
"hero01_flash": ExtResource("16_ctotk"),
"hero01_long_air_attack01": ExtResource("1_b46g3"), "hero01_long_air_attack01": ExtResource("1_b46g3"),
"hero01_long_air_attack02": ExtResource("2_8wtap"), "hero01_long_air_attack02": ExtResource("2_8wtap"),
"hero01_long_air_attack03": ExtResource("2_nqaew"), "hero01_long_air_attack03": ExtResource("2_nqaew"),
@ -84,7 +81,6 @@ _data = {
"hero01_long_attack02": ExtResource("2_klfcs"), "hero01_long_attack02": ExtResource("2_klfcs"),
"hero01_long_attack03": ExtResource("3_g8q4d"), "hero01_long_attack03": ExtResource("3_g8q4d"),
"hero01_long_attack04": ExtResource("4_36e6x"), "hero01_long_attack04": ExtResource("4_36e6x"),
"hero01_long_flash": ExtResource("5_fumom"),
"hero01_long_skill01": ExtResource("5_kt0qw"), "hero01_long_skill01": ExtResource("5_kt0qw"),
"hero01_long_skill02": ExtResource("7_ui68j"), "hero01_long_skill02": ExtResource("7_ui68j"),
"hero01_remote01": ExtResource("33_7i37k"), "hero01_remote01": ExtResource("33_7i37k"),

@ -1,4 +1,4 @@
[gd_scene load_steps=24 format=3 uid="uid://8rcvw1vnjcf7"] [gd_scene load_steps=25 format=3 uid="uid://8rcvw1vnjcf7"]
[ext_resource type="Script" path="res://script/character/character.gd" id="1_tonbs"] [ext_resource type="Script" path="res://script/character/character.gd" id="1_tonbs"]
[ext_resource type="Script" path="res://script/character/hitbox.gd" id="2_6xf87"] [ext_resource type="Script" path="res://script/character/hitbox.gd" id="2_6xf87"]
@ -36,6 +36,10 @@ shader_parameter/deformation_dir = Vector2(0, 0)
shader_parameter/deformation_rate = 0.0 shader_parameter/deformation_rate = 0.0
shader_parameter/tex = ExtResource("4_fcd8a") shader_parameter/tex = ExtResource("4_fcd8a")
[sub_resource type="Curve" id="Curve_1lu0a"]
_data = [Vector2(0, 0), 0.0, 0.0, 0, 1, Vector2(0.503856, 0), 0.0, 0.0, 0, 0, Vector2(1, 1), 2.01554, 0.0, 1, 0]
point_count = 3
[sub_resource type="Animation" id="Animation_dbjx6"] [sub_resource type="Animation" id="Animation_dbjx6"]
length = 0.001 length = 0.001
tracks/0/type = "value" tracks/0/type = "value"
@ -116,6 +120,7 @@ script = ExtResource("4_vijjv")
[node name="Move" type="Node3D" parent="."] [node name="Move" type="Node3D" parent="."]
unique_name_in_owner = true unique_name_in_owner = true
script = ExtResource("4_66r53") script = ExtResource("4_66r53")
after_image_speed_curve = SubResource("Curve_1lu0a")
[node name="Skill" type="AnimationPlayer" parent="."] [node name="Skill" type="AnimationPlayer" parent="."]
unique_name_in_owner = true unique_name_in_owner = true

@ -7,3 +7,4 @@ script = ExtResource("2_grtq1")
lifetime = 0.2 lifetime = 0.2
[node name="AnimatedSprite3D" type="AnimatedSprite3D" parent="."] [node name="AnimatedSprite3D" type="AnimatedSprite3D" parent="."]
pixel_size = 0.02

@ -21,7 +21,7 @@
[ext_resource type="Script" path="res://script/manager/item_manager.gd" id="12_xwufn"] [ext_resource type="Script" path="res://script/manager/item_manager.gd" id="12_xwufn"]
[ext_resource type="Script" path="res://script/character/status.gd" id="18_nr8sb"] [ext_resource type="Script" path="res://script/character/status.gd" id="18_nr8sb"]
[ext_resource type="SpriteFrames" uid="uid://2cb8lknel0ih" path="res://resource/animation/character/basic_move.aseprite" id="20_4ni1a"] [ext_resource type="SpriteFrames" uid="uid://2cb8lknel0ih" path="res://resource/animation/character/basic_move.aseprite" id="20_4ni1a"]
[ext_resource type="SpriteFrames" uid="uid://ce83cuqwgwwi4" path="res://resource/animation/character/hero01_long_attack.aseprite" id="20_8k3m1"] [ext_resource type="SpriteFrames" uid="uid://bvnjq6vtioip" path="res://resource/animation/character/hero01_fist_skill02.aseprite" id="21_fmv7o"]
[ext_resource type="AnimationLibrary" uid="uid://croik07a1qko5" path="res://resource/skill_animation_library/animation_library.tres" id="22_qyapv"] [ext_resource type="AnimationLibrary" uid="uid://croik07a1qko5" path="res://resource/skill_animation_library/animation_library.tres" id="22_qyapv"]
[ext_resource type="Script" path="res://script/character/skill.gd" id="23_783eu"] [ext_resource type="Script" path="res://script/character/skill.gd" id="23_783eu"]
[ext_resource type="Script" path="res://script/character/move.gd" id="25_d520l"] [ext_resource type="Script" path="res://script/character/move.gd" id="25_d520l"]
@ -222,9 +222,8 @@ pixel_size = 0.02
double_sided = false double_sided = false
alpha_cut = 2 alpha_cut = 2
texture_filter = 0 texture_filter = 0
sprite_frames = ExtResource("20_8k3m1") sprite_frames = ExtResource("21_fmv7o")
animation = &"long_air_attack03" animation = &"fist_skill_charging02"
frame = 8
[node name="Throw" type="AnimatedSprite3D" parent="EditorTool/Character"] [node name="Throw" type="AnimatedSprite3D" parent="EditorTool/Character"]
unique_name_in_owner = true unique_name_in_owner = true

File diff suppressed because one or more lines are too long

@ -393,7 +393,7 @@ func change_dir() -> void:
var target: Character = Global.character_mgr.get_character(status.target) var target: Character = Global.character_mgr.get_character(status.target)
if target: if target:
cast_dir = target.pos2D() - character.pos2D() cast_dir = target.pos2D() - character.pos2D()
status.skill_dir = cast_dir status.skill_dir = cast_dir.normalized()
status.is_right = cast_dir.x > 0 status.is_right = cast_dir.x > 0

@ -67,19 +67,20 @@ func _process(delta) -> void:
temp_release_particle_list.clear() temp_release_particle_list.clear()
func cast_image(res: Resource): func cast_image(res: Resource, alpha: float):
var new_afterimage: Afterimage = afterimage.instantiate() as Afterimage var new_afterimage: Afterimage = afterimage.instantiate() as Afterimage
new_afterimage.position = character.view_pos() new_afterimage.position = character.view_pos()
new_afterimage.name = "afterimage" new_afterimage.name = "afterimage"
new_afterimage.velocity = character.velocity / 4 new_afterimage.velocity = character.velocity / 4
new_afterimage.target = view new_afterimage.target = view
new_afterimage.alpha = alpha
SignalManager.effect_create.emit(new_afterimage) SignalManager.effect_create.emit(new_afterimage)
func cast_after_image(): cast_image(afterimage) func cast_after_image(alpha: float): cast_image(afterimage, alpha)
func cast_corpse(): cast_image(corpse) func cast_corpse(): cast_image(corpse, 1)
func cast_particle(resource: Resource, is_attach: bool, offset: Vector3, scale: Vector3): _cast_particle(resource, is_attach, offset, scale) func cast_particle(resource: Resource, is_attach: bool, offset: Vector3, scale: Vector3): _cast_particle(resource, is_attach, offset, scale)

@ -1,9 +1,14 @@
extends Node3D extends Node3D
class_name Move class_name Move
@export var after_image_speed_curve: Curve
var after_image_speed_max: float = 10
@onready var character: Character = (get_owner() as Character) @onready var character: Character = (get_owner() as Character)
@onready var status: Status = (%Status as Status) @onready var status: Status = (%Status as Status)
@onready var buff: Buff = (%Buff as Buff) @onready var buff: Buff = (%Buff as Buff)
@onready var effect: Effect = (%Effect as Effect)
var gravity = ProjectSettings.get_setting("physics/3d/default_gravity") var gravity = ProjectSettings.get_setting("physics/3d/default_gravity")
var velocity_cache: Vector3 var velocity_cache: Vector3
@ -26,6 +31,7 @@ func _process(delta) -> void:
if is_hit_floor: if is_hit_floor:
SignalManager.character_hit_floor.emit(character.id(), character.pos()) SignalManager.character_hit_floor.emit(character.id(), character.pos())
update_deformation(delta) update_deformation(delta)
update_move_effect(delta)
return return
@ -85,11 +91,20 @@ func update_deformation(delta):
character.add_buff("deformation", 0.2) character.add_buff("deformation", 0.2)
func update_move_effect(delta):
var speed: float = character.velocity.length()
var speed_rate: float = clamp(speed / after_image_speed_max, 0, 1)
var after_image_alpha: float = clamp(after_image_speed_curve.sample(speed_rate), 0, 1)
if after_image_alpha > 0:
effect.cast_after_image(after_image_alpha)
func jump(): func jump():
character.velocity.y = status.cfg.move.jump_velocity character.velocity.y = status.cfg.move.jump_velocity
status.is_jumped = true status.is_jumped = true
status.trigger_jump = true status.trigger_jump = true
buff.add_buff("jumping", 0.1) buff.add_buff("jumping", 0.1)
func stop(): func stop():
character.velocity = Vector3.ZERO character.velocity = Vector3.ZERO

@ -7,6 +7,8 @@ class_name Afterimage
var velocity: Vector3 var velocity: Vector3
var target: AnimatedSprite3D var target: AnimatedSprite3D
var alpha: float
var material: ShaderMaterial
func on_ready(): func on_ready():
@ -16,9 +18,20 @@ func on_ready():
image.frame_progress = target.frame_progress image.frame_progress = target.frame_progress
image.scale.x = target.scale.x image.scale.x = target.scale.x
image.pixel_size = Setting.pixel_size image.pixel_size = Setting.pixel_size
material = ResourceManager.material_after_image.duplicate()
image.material_override = material
update_material()
func on_process(delta): func on_process(delta):
if is_moving: if is_moving:
position += velocity*delta position += velocity*delta
image.modulate.a = rate # image.modulate.a = rate * alpha
update_material()
func update_material() -> void:
if material and image.sprite_frames and image.animation:
var tex: Texture2D = image.sprite_frames.get_frame_texture(image.animation, image.frame)
material.set_shader_parameter("tex", tex)
material.set_shader_parameter("alpha", rate * alpha)

@ -20,7 +20,7 @@ var follow_dist_max: float = 5.0
@onready var sprite3D: Sprite3D = %Sprite3D as Sprite3D @onready var sprite3D: Sprite3D = %Sprite3D as Sprite3D
@onready var collision_shape: CollisionShape3D = %CollisionShape3D as CollisionShape3D @onready var collision_shape: CollisionShape3D = %CollisionShape3D as CollisionShape3D
var frame_rate: float = 0.05 var frame_rate: float = 0.1
var frame_time: float = 0 var frame_time: float = 0

@ -12,6 +12,7 @@ var scene_pt: PackedScene = load("res://scene/item/pt.tscn")
#==material== #==material==
var material_character: Material = load("res://render/material/character.tres") as Material var material_character: Material = load("res://render/material/character.tres") as Material
var material_character_sub: Material = load("res://render/material/character_sub.tres") as Material var material_character_sub: Material = load("res://render/material/character_sub.tres") as Material
var material_after_image: Material = load("res://render/material/after_image.tres") as Material
#==effect== #==effect==
#hit #hit
var particle_hit_blunt_normal: PackedScene = load("res://scene/effect/particle/particle_hit_blunt_normal.tscn") var particle_hit_blunt_normal: PackedScene = load("res://scene/effect/particle/particle_hit_blunt_normal.tscn")

@ -73,7 +73,7 @@ func on_character_hit_text(id: int, value: String) -> void:
return return
var headbar_meta = headbar_map[id] var headbar_meta = headbar_map[id]
var headbar: Headbar = headbar_meta.headbar as Headbar var headbar: Headbar = headbar_meta.headbar as Headbar
headbar.on_hit_text(value) # headbar.on_hit_text(value)
func on_character_hit_damage(id: int, value: float) -> void: func on_character_hit_damage(id: int, value: float) -> void:
@ -81,7 +81,7 @@ func on_character_hit_damage(id: int, value: float) -> void:
return return
var headbar_meta = headbar_map[id] var headbar_meta = headbar_map[id]
var headbar: Headbar = headbar_meta.headbar as Headbar var headbar: Headbar = headbar_meta.headbar as Headbar
headbar.on_hit_damage(value) # headbar.on_hit_damage(value)
func on_character_die(id: int) -> void: func on_character_die(id: int) -> void:

Loading…
Cancel
Save