基础系统调整
parent
630b61b344
commit
fd2f2ce5e5
@ -0,0 +1,9 @@
|
||||
[gd_resource type="Resource" script_class="CharacterMoveCfg" load_steps=2 format=3 uid="uid://dx54fjf5t0uu8"]
|
||||
|
||||
[ext_resource type="Script" path="res://script/config/character_move_cfg.gd" id="1_r4l81"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_r4l81")
|
||||
speed = 1.5
|
||||
gravity_scale = 1.0
|
||||
jump_velocity = 3.0
|
||||
@ -0,0 +1,17 @@
|
||||
[gd_resource type="Resource" script_class="PlayerSkillCfg" load_steps=5 format=3 uid="uid://b6x3jdiqtum6"]
|
||||
|
||||
[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="1_gik08"]
|
||||
[ext_resource type="Animation" uid="uid://daopmieibx3b7" path="res://resource/skill_animation/hero01_long_attack01.tres" id="2_6nbpq"]
|
||||
[ext_resource type="SpriteFrames" uid="uid://7swf8owxd63i" path="res://resource/animation/character/hero01_long_attack.aseprite" id="3_og1bb"]
|
||||
[ext_resource type="Resource" uid="uid://cy3wwalxeyro0" path="res://config/weapon/long.tres" id="4_id85o"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_gik08")
|
||||
weapon = ExtResource("4_id85o")
|
||||
stance_from = 0
|
||||
stance_to = 1
|
||||
name = ""
|
||||
skill_animation = ExtResource("2_6nbpq")
|
||||
has_animation = false
|
||||
sprite_frams = ExtResource("3_og1bb")
|
||||
animation_name = "long_attack01"
|
||||
@ -0,0 +1,17 @@
|
||||
[gd_resource type="Resource" script_class="PlayerSkillCfg" load_steps=5 format=3 uid="uid://cs32884hwqxd7"]
|
||||
|
||||
[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="1_e0fqi"]
|
||||
[ext_resource type="Animation" uid="uid://bf6jaraltouun" path="res://resource/skill_animation/hero01_long_attack02.tres" id="2_jrgan"]
|
||||
[ext_resource type="SpriteFrames" uid="uid://7swf8owxd63i" path="res://resource/animation/character/hero01_long_attack.aseprite" id="3_jidy7"]
|
||||
[ext_resource type="Resource" uid="uid://cy3wwalxeyro0" path="res://config/weapon/long.tres" id="4_novna"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_e0fqi")
|
||||
weapon = ExtResource("4_novna")
|
||||
stance_from = 1
|
||||
stance_to = 2
|
||||
name = ""
|
||||
skill_animation = ExtResource("2_jrgan")
|
||||
has_animation = true
|
||||
sprite_frams = ExtResource("3_jidy7")
|
||||
animation_name = "long_attack02"
|
||||
@ -0,0 +1,17 @@
|
||||
[gd_resource type="Resource" script_class="PlayerSkillCfg" load_steps=5 format=3 uid="uid://huxlxrmyulo"]
|
||||
|
||||
[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="1_uaib7"]
|
||||
[ext_resource type="Resource" uid="uid://cy3wwalxeyro0" path="res://config/weapon/long.tres" id="2_8uqiw"]
|
||||
[ext_resource type="Animation" uid="uid://c8yueqe7rjn60" path="res://resource/skill_animation/hero01_long_attack03.tres" id="2_ugt3f"]
|
||||
[ext_resource type="SpriteFrames" uid="uid://7swf8owxd63i" path="res://resource/animation/character/hero01_long_attack.aseprite" id="3_sr2og"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_uaib7")
|
||||
weapon = ExtResource("2_8uqiw")
|
||||
stance_from = 2
|
||||
stance_to = 3
|
||||
name = ""
|
||||
skill_animation = ExtResource("2_ugt3f")
|
||||
has_animation = true
|
||||
sprite_frams = ExtResource("3_sr2og")
|
||||
animation_name = "long_attack03"
|
||||
@ -0,0 +1,17 @@
|
||||
[gd_resource type="Resource" script_class="PlayerSkillCfg" load_steps=5 format=3 uid="uid://chuv8k5d44ln4"]
|
||||
|
||||
[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="1_xsxbs"]
|
||||
[ext_resource type="Animation" uid="uid://dk1o3gqhjmuvh" path="res://resource/skill_animation/hero01_long_attack04.tres" id="2_sam6s"]
|
||||
[ext_resource type="SpriteFrames" uid="uid://7swf8owxd63i" path="res://resource/animation/character/hero01_long_attack.aseprite" id="3_w7h1m"]
|
||||
[ext_resource type="Resource" uid="uid://cy3wwalxeyro0" path="res://config/weapon/long.tres" id="4_plyre"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_xsxbs")
|
||||
weapon = ExtResource("4_plyre")
|
||||
stance_from = 3
|
||||
stance_to = 4
|
||||
name = ""
|
||||
skill_animation = ExtResource("2_sam6s")
|
||||
has_animation = true
|
||||
sprite_frams = ExtResource("3_w7h1m")
|
||||
animation_name = "long_attack04"
|
||||
@ -1,15 +0,0 @@
|
||||
[gd_resource type="Resource" script_class="PlayerSkillCfg" load_steps=5 format=3 uid="uid://b6x3jdiqtum6"]
|
||||
|
||||
[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="1_rossy"]
|
||||
[ext_resource type="Resource" uid="uid://cy3wwalxeyro0" path="res://config/weapon/long.tres" id="2_eiqoa"]
|
||||
[ext_resource type="SpriteFrames" uid="uid://7swf8owxd63i" path="res://resource/animation/character/hero01_long_normal_attack.aseprite" id="2_h7r7b"]
|
||||
[ext_resource type="Animation" uid="uid://b28xyr8shsxad" path="res://resource/skill_animation/hero01_long_normal_attack01.tres" id="2_xp4qp"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_rossy")
|
||||
weapon = ExtResource("2_eiqoa")
|
||||
name = ""
|
||||
skill_animation = ExtResource("2_xp4qp")
|
||||
has_animation = true
|
||||
sprite_frams = ExtResource("2_h7r7b")
|
||||
animation_name = "long_attack01"
|
||||
@ -1,13 +0,0 @@
|
||||
[gd_resource type="Resource" script_class="PlayerSkillCfg" load_steps=4 format=3 uid="uid://cs32884hwqxd7"]
|
||||
|
||||
[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="1_oext1"]
|
||||
[ext_resource type="Animation" uid="uid://cidi63jms7hxv" path="res://resource/skill_animation/hero01_long_normal_attack02.tres" id="2_x4jpa"]
|
||||
[ext_resource type="SpriteFrames" uid="uid://7swf8owxd63i" path="res://resource/animation/character/hero01_long_normal_attack.aseprite" id="3_o58di"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_oext1")
|
||||
name = ""
|
||||
skill_animation = ExtResource("2_x4jpa")
|
||||
has_animation = true
|
||||
sprite_frams = ExtResource("3_o58di")
|
||||
animation_name = "long_attack02"
|
||||
@ -0,0 +1,17 @@
|
||||
[gd_resource type="Resource" script_class="PlayerSkillCfg" load_steps=5 format=3 uid="uid://bi2ipbximefsr"]
|
||||
|
||||
[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="1_ud5ph"]
|
||||
[ext_resource type="Animation" uid="uid://bjnkrte7660pt" path="res://resource/skill_animation/hero01_long_skill01.tres" id="2_ewts2"]
|
||||
[ext_resource type="SpriteFrames" uid="uid://0yuryfn6dc2v" path="res://resource/animation/character/hero01_long_skill01.aseprite" id="3_qwjfl"]
|
||||
[ext_resource type="Resource" uid="uid://cy3wwalxeyro0" path="res://config/weapon/long.tres" id="4_3bf64"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_ud5ph")
|
||||
weapon = ExtResource("4_3bf64")
|
||||
stance_from = 1
|
||||
stance_to = 2
|
||||
name = ""
|
||||
skill_animation = ExtResource("2_ewts2")
|
||||
has_animation = true
|
||||
sprite_frams = ExtResource("3_qwjfl")
|
||||
animation_name = "long_skill01"
|
||||
|
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
@ -0,0 +1,43 @@
|
||||
[gd_resource type="Animation" load_steps=2 format=3 uid="uid://c8yueqe7rjn60"]
|
||||
|
||||
[ext_resource type="SpriteFrames" uid="uid://7swf8owxd63i" path="res://resource/animation/character/hero01_long_attack.aseprite" id="1_o7s2b"]
|
||||
|
||||
[resource]
|
||||
resource_name = "hero01_long_attack03"
|
||||
length = 1.2
|
||||
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": 0,
|
||||
"values": [ExtResource("1_o7s2b")]
|
||||
}
|
||||
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": 0,
|
||||
"values": ["long_attack03"]
|
||||
}
|
||||
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, 0.8, 0.9, 1, 1.1),
|
||||
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
|
||||
"update": 0,
|
||||
"values": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
|
||||
}
|
||||
@ -0,0 +1,43 @@
|
||||
[gd_resource type="Animation" load_steps=2 format=3 uid="uid://dk1o3gqhjmuvh"]
|
||||
|
||||
[ext_resource type="SpriteFrames" uid="uid://7swf8owxd63i" path="res://resource/animation/character/hero01_long_attack.aseprite" id="1_ixwev"]
|
||||
|
||||
[resource]
|
||||
resource_name = "hero01_long_attack04"
|
||||
length = 1.2
|
||||
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": 0,
|
||||
"values": [ExtResource("1_ixwev")]
|
||||
}
|
||||
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": 0,
|
||||
"values": ["long_attack04"]
|
||||
}
|
||||
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, 0.8, 0.9, 1, 1.1),
|
||||
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
|
||||
"update": 0,
|
||||
"values": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
|
||||
}
|
||||
@ -0,0 +1,42 @@
|
||||
[gd_resource type="Animation" load_steps=2 format=3 uid="uid://bjnkrte7660pt"]
|
||||
|
||||
[ext_resource type="SpriteFrames" uid="uid://0yuryfn6dc2v" path="res://resource/animation/character/hero01_long_skill01.aseprite" id="1_54a73"]
|
||||
|
||||
[resource]
|
||||
resource_name = "hero01_long_skill01"
|
||||
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": 0,
|
||||
"values": [ExtResource("1_54a73")]
|
||||
}
|
||||
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": 0,
|
||||
"values": ["long_skill01"]
|
||||
}
|
||||
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, 0.8, 0.9),
|
||||
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
|
||||
"update": 0,
|
||||
"values": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
|
||||
}
|
||||
@ -1,10 +1,16 @@
|
||||
[gd_resource type="AnimationLibrary" load_steps=3 format=3 uid="uid://croik07a1qko5"]
|
||||
[gd_resource type="AnimationLibrary" load_steps=6 format=3 uid="uid://croik07a1qko5"]
|
||||
|
||||
[ext_resource type="Animation" uid="uid://bw5cffjywlaev" path="res://resource/skill_animation/hero01_long_normal_attack01.tres" id="1_jm0a8"]
|
||||
[ext_resource type="Animation" uid="uid://c1onpty5sqaru" path="res://resource/skill_animation/hero01_long_normal_attack02.tres" id="2_mdnyw"]
|
||||
[ext_resource type="Animation" uid="uid://daopmieibx3b7" path="res://resource/skill_animation/hero01_long_attack01.tres" id="1_nwjtl"]
|
||||
[ext_resource type="Animation" uid="uid://bf6jaraltouun" path="res://resource/skill_animation/hero01_long_attack02.tres" id="2_klfcs"]
|
||||
[ext_resource type="Animation" uid="uid://c8yueqe7rjn60" path="res://resource/skill_animation/hero01_long_attack03.tres" id="3_g8q4d"]
|
||||
[ext_resource type="Animation" uid="uid://dk1o3gqhjmuvh" path="res://resource/skill_animation/hero01_long_attack04.tres" id="4_36e6x"]
|
||||
[ext_resource type="Animation" uid="uid://bjnkrte7660pt" path="res://resource/skill_animation/hero01_long_skill01.tres" id="5_kt0qw"]
|
||||
|
||||
[resource]
|
||||
_data = {
|
||||
"hero01_long_normal_attack01": ExtResource("1_jm0a8"),
|
||||
"hero01_long_normal_attack02": ExtResource("2_mdnyw")
|
||||
"hero01_long_attack01": ExtResource("1_nwjtl"),
|
||||
"hero01_long_attack02": ExtResource("2_klfcs"),
|
||||
"hero01_long_attack03": ExtResource("3_g8q4d"),
|
||||
"hero01_long_attack04": ExtResource("4_36e6x"),
|
||||
"hero01_long_skill01": ExtResource("5_kt0qw")
|
||||
}
|
||||
|
||||
@ -1,14 +1,16 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://b85fy0wfgr4gs"]
|
||||
[gd_scene load_steps=5 format=3 uid="uid://b85fy0wfgr4gs"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://vnkcr04hevna" path="res://scene/character/character.tscn" id="1_bny0p"]
|
||||
[ext_resource type="Script" path="res://script/character/player/input.gd" id="2_qkra8"]
|
||||
[ext_resource type="Resource" uid="uid://b6x3jdiqtum6" path="res://config/player_skill/hero01_long_normal_attack01.tres" id="3_b6mhs"]
|
||||
[ext_resource type="Resource" uid="uid://b6x3jdiqtum6" path="res://config/player_skill/hero01_long_attack01.tres" id="3_n2lf8"]
|
||||
[ext_resource type="Script" path="res://script/character/player/combo.gd" id="4_jsefx"]
|
||||
|
||||
[node name="Character" instance=ExtResource("1_bny0p")]
|
||||
|
||||
[node name="View" parent="." index="2"]
|
||||
animation = &"long_attack01"
|
||||
|
||||
[node name="Input" type="Node3D" parent="." index="5"]
|
||||
script = ExtResource("2_qkra8")
|
||||
test_skill_cfg = ExtResource("3_b6mhs")
|
||||
test_skill_cfg = ExtResource("3_n2lf8")
|
||||
|
||||
[node name="Combo" type="Node3D" parent="." index="6"]
|
||||
unique_name_in_owner = true
|
||||
script = ExtResource("4_jsefx")
|
||||
|
||||
@ -1,4 +1,12 @@
|
||||
@tool
|
||||
extends Node3D
|
||||
|
||||
enum EActionType {Pressed, Released}
|
||||
enum ECharacterType {Player, Monster, Bullet}
|
||||
enum EStance {
|
||||
Idle,Ground1,Ground2,Ground3,Ground4,Ground5,Ground6,Ground7,
|
||||
AirIdle = 10,Air1,Air2,Air3,
|
||||
None = 99,
|
||||
Any = 100,
|
||||
}
|
||||
enum EBreakLevel {None, Cancel, Combo, Jump, Walk} #不可打断 取消技打断 连招打断 跳跃打断 行走打断
|
||||
|
||||
@ -1,5 +1,20 @@
|
||||
@tool
|
||||
extends Node3D
|
||||
|
||||
var animation_library = load("res://resource/skill_animation_library/animation_library.tres")
|
||||
|
||||
func get_resource_name(resource:Resource) -> String:
|
||||
return resource.resource_path.get_file().trim_suffix('.tres') #todo 性能
|
||||
|
||||
func refresh_animation_lib():
|
||||
var dir_path = "res://resource/skill_animation"
|
||||
var dir = DirAccess.open(dir_path)
|
||||
for file in dir.get_files():
|
||||
var path = dir_path + "/" + file
|
||||
var res = load(path)
|
||||
if res is Animation:
|
||||
var animation = res as Animation
|
||||
var animation_name = Util.get_resource_name(animation)
|
||||
animation_library.add_animation(animation_name,animation)
|
||||
animation_library.animation_added.emit(animation_name)
|
||||
|
||||
|
||||
@ -0,0 +1,13 @@
|
||||
extends Node3D
|
||||
|
||||
var skill_map = {} #stance -> skill
|
||||
var input_list = [] #指令缓存
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
pass
|
||||
@ -0,0 +1,7 @@
|
||||
extends Resource
|
||||
|
||||
class_name CharacterMoveCfg
|
||||
|
||||
@export var speed : float
|
||||
@export var gravity_scale : float
|
||||
@export var jump_velocity : float
|
||||
@ -1,5 +1,5 @@
|
||||
extends Resource
|
||||
|
||||
class_name Weapon
|
||||
class_name WeaponCfg
|
||||
|
||||
@export var name : String
|
||||
|
||||
@ -0,0 +1,9 @@
|
||||
@tool
|
||||
extends Node3D
|
||||
|
||||
@export var refresh_animation_lib : bool :
|
||||
get:
|
||||
return false
|
||||
set(value):
|
||||
Util.refresh_animation_lib()
|
||||
|
||||
Loading…
Reference in New Issue