chendian 1 year ago
commit 48dd479442

@ -1,4 +1,4 @@
[gd_scene load_steps=20 format=3 uid="uid://eoydwrunmm5n"]
[gd_scene load_steps=21 format=3 uid="uid://eoydwrunmm5n"]
[ext_resource type="Script" path="res://script/manager/game_manager.gd" id="1_q2t80"]
[ext_resource type="Script" path="res://script/manager/level_manager.gd" id="2_ewhkj"]
@ -17,6 +17,7 @@
[ext_resource type="PackedScene" uid="uid://b78dbmcsioaa4" path="res://scene/ui/status_screen.tscn" id="9_bki0o"]
[ext_resource type="PackedScene" uid="uid://0uonhojhfgi" path="res://scene/ui/menu_screen.tscn" id="10_sky2n"]
[ext_resource type="Script" path="res://script/manager/input_manager.gd" id="12_vfqm4"]
[ext_resource type="PackedScene" uid="uid://8rcvw1vnjcf7" path="res://scene/character/character.tscn" id="18_2ae4v"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_b4sw2"]
shader = ExtResource("2_iwyj8")
@ -94,6 +95,9 @@ process_mode = 3
script = ExtResource("12_vfqm4")
[node name="EditorTool" type="Node3D" parent="."]
visible = false
script = ExtResource("5_n3qhi")
[node name="Character" parent="EditorTool" instance=ExtResource("18_2ae4v")]
[connection signal="item_rect_changed" from="GameManager/Stage" to="GameManager/Stage" method="_on_item_rect_changed"]

@ -18,6 +18,35 @@ extends Node3D
process_dir("res://")
print("done.")
var selected_skill_file: String
func _process(delta: float) -> void:
if not Engine.is_editor_hint():
return
var selected_paths = EditorInterface.get_selected_paths()
if len(selected_paths) != 1:
return
var selected_path = selected_paths[0]
if selected_skill_file == selected_path:
return
selected_skill_file = selected_path
if not selected_path.ends_with(".tres"):
return
var res := ResourceLoader.load(selected_path)
if not res is SkillCfg:
return
var skill_cfg = res as SkillCfg
if not skill_cfg.skill_animation:
return
var character_skill = $Character/Skill as AnimationPlayer
EditorInterface.edit_node(character_skill)
var animation_name: String = "animation_library/%s" % Util.get_resource_name(res)
character_skill.current_animation = animation_name
print(selected_path)
EditorInterface.edit_resource(res)
func process_mesh_lib(dir_name: String) -> void:
var dir := DirAccess.open(dir_name)

@ -1,6 +1,7 @@
extends Node3D
#==scene==
var scene_character: PackedScene = load("res://scene/character/character.tscn")
var scene_player: PackedScene = load("res://scene/character/player.tscn")
var scene_monster: PackedScene = load("res://scene/character/monster.tscn")
var scene_bullet: PackedScene = load("res://scene/character/bullet.tscn")

Loading…
Cancel
Save