怪物核心系统 初版
parent
ac7bd2aa40
commit
a1e321d180
@ -0,0 +1,14 @@
|
|||||||
|
[gd_resource type="Resource" script_class="CoreCfg" load_steps=6 format=3 uid="uid://chx14f0ty3usd"]
|
||||||
|
|
||||||
|
[ext_resource type="Texture2D" uid="uid://bsafgg7cbtusa" path="res://resource/ui/icon/core/default.png" id="1_by0g3"]
|
||||||
|
[ext_resource type="Script" path="res://script/config/core_cfg.gd" id="1_v24ds"]
|
||||||
|
[ext_resource type="Resource" uid="uid://cuwtxibg84nno" path="res://config/skill_player_common/hero01_common_skill0101.tres" id="3_oj1qu"]
|
||||||
|
[ext_resource type="Resource" uid="uid://lr1iguojoyk" path="res://config/skill_player_common/hero01_common_skill0102.tres" id="4_we7wm"]
|
||||||
|
[ext_resource type="Resource" uid="uid://b8b1afegmabx6" path="res://config/skill_player_common/hero01_common_skill0103.tres" id="5_1xn4f"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_v24ds")
|
||||||
|
name = ""
|
||||||
|
icon = ExtResource("1_by0g3")
|
||||||
|
type = 0
|
||||||
|
skill_list = Array[Resource("res://script/config/player_skill_cfg.gd")]([ExtResource("3_oj1qu"), ExtResource("4_we7wm"), ExtResource("5_1xn4f")])
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
[gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=4 format=3 uid="uid://cuwtxibg84nno"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="1_702bi"]
|
||||||
|
[ext_resource type="Animation" uid="uid://dokxns0q44rux" path="res://resource/skill_animation/hero01_common_skill0101.tres" id="2_o71rh"]
|
||||||
|
[ext_resource type="SpriteFrames" uid="uid://ce83cuqwgwwi4" path="res://resource/animation/character/hero01_long_attack.aseprite" id="3_ppacp"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_702bi")
|
||||||
|
stance_from = 100
|
||||||
|
stance_to = 2
|
||||||
|
break_level = 3
|
||||||
|
action = "none"
|
||||||
|
name = ""
|
||||||
|
skill_animation = ExtResource("2_o71rh")
|
||||||
|
attack_list = Array[Resource("res://script/config/attack_cfg.gd")]([])
|
||||||
|
sub_character_list = Array[Resource("res://script/config/character_cfg.gd")]([])
|
||||||
|
free_lock = false
|
||||||
|
refresh_animation = false
|
||||||
|
sprite_frames = ExtResource("3_ppacp")
|
||||||
|
animation_name = "long_attack01"
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
[gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=4 format=3 uid="uid://lr1iguojoyk"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="1_42tyl"]
|
||||||
|
[ext_resource type="Animation" uid="uid://d0rn5wwwnu4oh" path="res://resource/skill_animation/hero01_common_skill0102.tres" id="2_ar1pk"]
|
||||||
|
[ext_resource type="SpriteFrames" uid="uid://ce83cuqwgwwi4" path="res://resource/animation/character/hero01_long_attack.aseprite" id="3_11afq"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_42tyl")
|
||||||
|
stance_from = 100
|
||||||
|
stance_to = 3
|
||||||
|
break_level = 1
|
||||||
|
action = "none"
|
||||||
|
name = ""
|
||||||
|
skill_animation = ExtResource("2_ar1pk")
|
||||||
|
attack_list = Array[Resource("res://script/config/attack_cfg.gd")]([])
|
||||||
|
sub_character_list = Array[Resource("res://script/config/character_cfg.gd")]([])
|
||||||
|
free_lock = false
|
||||||
|
refresh_animation = false
|
||||||
|
sprite_frames = ExtResource("3_11afq")
|
||||||
|
animation_name = "long_attack02"
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
[gd_resource type="Resource" script_class="SkillPlayerCfg" load_steps=4 format=3 uid="uid://b8b1afegmabx6"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://script/config/player_skill_cfg.gd" id="1_uhj5t"]
|
||||||
|
[ext_resource type="Animation" uid="uid://cm4c0rwh0mqn4" path="res://resource/skill_animation/hero01_common_skill0103.tres" id="2_breja"]
|
||||||
|
[ext_resource type="SpriteFrames" uid="uid://ce83cuqwgwwi4" path="res://resource/animation/character/hero01_long_attack.aseprite" id="3_2hchk"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_uhj5t")
|
||||||
|
stance_from = 100
|
||||||
|
stance_to = 4
|
||||||
|
break_level = 1
|
||||||
|
action = "none"
|
||||||
|
name = ""
|
||||||
|
skill_animation = ExtResource("2_breja")
|
||||||
|
attack_list = Array[Resource("res://script/config/attack_cfg.gd")]([])
|
||||||
|
sub_character_list = Array[Resource("res://script/config/character_cfg.gd")]([])
|
||||||
|
free_lock = false
|
||||||
|
refresh_animation = false
|
||||||
|
sprite_frames = ExtResource("3_2hchk")
|
||||||
|
animation_name = "long_attack03"
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="Aseprite SpriteFrames Import"
|
||||||
|
type="SpriteFrames"
|
||||||
|
uid="uid://cl4tfb2auoa13"
|
||||||
|
path="res://.godot/imported/hero01_common_skill01.aseprite-bfba05e484edc594e4b3facf65316244.res"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://resource/animation/character/hero01_common_skill01.aseprite"
|
||||||
|
dest_files=["res://.godot/imported/hero01_common_skill01.aseprite-bfba05e484edc594e4b3facf65316244.res"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
spritesheet/layout=0
|
||||||
|
spritesheet/fixed_rows_count=1
|
||||||
|
spritesheet/fixed_columns_count=1
|
||||||
|
spritesheet/border_type=0
|
||||||
|
spritesheet/trim=false
|
||||||
|
spritesheet/ignore_empty=false
|
||||||
|
spritesheet/merge_duplicates=false
|
||||||
|
animation/default/name="default"
|
||||||
|
animation/default/direction=0
|
||||||
|
animation/default/repeat_count=0
|
||||||
|
animation/autoplay=""
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 8.5 KiB |
@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://dg702ysrfu4ip"
|
||||||
|
path="res://.godot/imported/hero01_common_skill01.png-def4dfcfc6697b4296d7a3324ec8e6f6.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://resource/animation/character/hero01_common_skill01.png"
|
||||||
|
dest_files=["res://.godot/imported/hero01_common_skill01.png-def4dfcfc6697b4296d7a3324ec8e6f6.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 24 KiB |
Binary file not shown.
File diff suppressed because one or more lines are too long
@ -0,0 +1,42 @@
|
|||||||
|
[gd_resource type="Animation" load_steps=2 format=3 uid="uid://dokxns0q44rux"]
|
||||||
|
|
||||||
|
[ext_resource type="SpriteFrames" uid="uid://ce83cuqwgwwi4" path="res://resource/animation/character/hero01_long_attack.aseprite" id="1_yt37s"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
resource_name = "hero01_common_skill0101"
|
||||||
|
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_yt37s")]
|
||||||
|
}
|
||||||
|
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_attack01"]
|
||||||
|
}
|
||||||
|
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": 1,
|
||||||
|
"values": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
|
||||||
|
}
|
||||||
@ -0,0 +1,42 @@
|
|||||||
|
[gd_resource type="Animation" load_steps=2 format=3 uid="uid://d0rn5wwwnu4oh"]
|
||||||
|
|
||||||
|
[ext_resource type="SpriteFrames" uid="uid://ce83cuqwgwwi4" path="res://resource/animation/character/hero01_long_attack.aseprite" id="1_qhsjf"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
resource_name = "hero01_common_skill0102"
|
||||||
|
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_qhsjf")]
|
||||||
|
}
|
||||||
|
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_attack02"]
|
||||||
|
}
|
||||||
|
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": 1,
|
||||||
|
"values": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
|
||||||
|
}
|
||||||
@ -0,0 +1,43 @@
|
|||||||
|
[gd_resource type="Animation" load_steps=2 format=3 uid="uid://cm4c0rwh0mqn4"]
|
||||||
|
|
||||||
|
[ext_resource type="SpriteFrames" uid="uid://ce83cuqwgwwi4" path="res://resource/animation/character/hero01_long_attack.aseprite" id="1_voh4c"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
resource_name = "hero01_common_skill0103"
|
||||||
|
length = 1.4
|
||||||
|
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_voh4c")]
|
||||||
|
}
|
||||||
|
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_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, 1.2, 1.3),
|
||||||
|
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
|
||||||
|
"update": 1,
|
||||||
|
"values": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
|
||||||
|
}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 300 B |
@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://bsafgg7cbtusa"
|
||||||
|
path="res://.godot/imported/default.png-cec70224a968b6e360e2daaba99ff112.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://resource/ui/icon/core/default.png"
|
||||||
|
dest_files=["res://.godot/imported/default.png-cec70224a968b6e360e2daaba99ff112.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=0
|
||||||
|
compress/normal_map=2
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=false
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=0
|
||||||
@ -0,0 +1,60 @@
|
|||||||
|
extends Node3D
|
||||||
|
class_name Core
|
||||||
|
|
||||||
|
@onready var character = (get_owner() as Character)
|
||||||
|
@onready var status = (%Status as Status)
|
||||||
|
@onready var skill = (%Skill as Skill)
|
||||||
|
@onready var move = (%Move as Move)
|
||||||
|
@onready var combo = (%Combo as Combo)
|
||||||
|
|
||||||
|
var active_core_action_list = [
|
||||||
|
"free_attack_heavy","free_attack_light","free_jump","free_interact",
|
||||||
|
"lock_attack_heavy","lock_attack_light","lock_jump","lock_interact",
|
||||||
|
]
|
||||||
|
|
||||||
|
func _ready():
|
||||||
|
# test
|
||||||
|
for i in range(8):
|
||||||
|
status.core_active_list.append(null)
|
||||||
|
set_active_core(0,load("res://config/core/free01.tres"))
|
||||||
|
|
||||||
|
func _process(delta):
|
||||||
|
pass
|
||||||
|
|
||||||
|
func set_active_core(index:int,core:CoreCfg):
|
||||||
|
match core.type:
|
||||||
|
Enum.ECoreType.Free:pass
|
||||||
|
Enum.ECoreType.Lock:index+=4
|
||||||
|
Enum.ECoreType.Passive:return
|
||||||
|
if index<0 or index>=8:
|
||||||
|
return
|
||||||
|
var core_pre = status.core_active_list[index]
|
||||||
|
if core_pre:
|
||||||
|
on_remove_active_core(index,core_pre)
|
||||||
|
status.core_active_list[index] = core
|
||||||
|
on_add_active_core(index,core)
|
||||||
|
status.emit_status("core_active_list")
|
||||||
|
|
||||||
|
func on_add_active_core(index:int,core:CoreCfg):
|
||||||
|
for skill in core.skill_list:
|
||||||
|
var action = active_core_action_list[index]
|
||||||
|
combo.add_skill(action,skill)
|
||||||
|
|
||||||
|
func on_remove_active_core(index:int,core:CoreCfg):
|
||||||
|
for skill in core.skill_list:
|
||||||
|
var action = active_core_action_list[index]
|
||||||
|
combo.remove_skill(action,skill)
|
||||||
|
|
||||||
|
func add_passive_core(core:CoreCfg):
|
||||||
|
match core.type:
|
||||||
|
Enum.ECoreType.Free:return
|
||||||
|
Enum.ECoreType.Lock:return
|
||||||
|
status.core_passive_list.append(core)
|
||||||
|
status.emit_status("core_passive_list")
|
||||||
|
|
||||||
|
func remove_passive_core(core:CoreCfg):
|
||||||
|
match core.type:
|
||||||
|
Enum.ECoreType.Free:return
|
||||||
|
Enum.ECoreType.Lock:return
|
||||||
|
status.core_passive_list.filter(func(c):return c!=core)
|
||||||
|
status.emit_status("core_passive_list")
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
extends Resource
|
||||||
|
|
||||||
|
class_name CoreCfg
|
||||||
|
|
||||||
|
@export var name : String
|
||||||
|
@export var icon : Texture2D
|
||||||
|
@export var type : Enum.ECoreType
|
||||||
|
@export var skill_list : Array[SkillPlayerCfg]
|
||||||
Loading…
Reference in New Issue