Giter Site home page Giter Site logo

ae_skill_editor's Introduction

项目重构!!!

ancientElement/AE_SkillEditor_Plus: AE_Skill_Editor的Plus版本 (github.com)

更加优美的UI界面

更加优雅的代码结构

更加简洁的自定义

丢弃所有第三方依赖

有各位的支持重构更有动力!!!

前言

由于我自己对编辑器的拓展和修改,有很多地方都是不足的,因为是我早期学习的作品,所以本编辑器推荐用于学习使用。

如果本人有精力,会出一套使用IMGUI制作的编辑器,大部分逻辑会套用此编辑器,但是会重构此编辑器的框架,因为现在的整体框架实现不太优雅了。

具体有轨道类与Clip类的关联形式,配置文件的序列化保存形式,没有没有对运行时做解耦。

如果想要了解本编辑器的制作,请自行学习此项目,这里着重讲解本编辑器的使用

你了解本编辑器的使用了,那么有源码参考对于制作而言就没有什么问题了。

概览

创建配置文件: 需要右键Creat-->Config-->SkillConfig

预览: 拖动时间轴,可以预览整体的播放。

添加Clip项: 添加动画、音效、特效、只需要直接拖拽对应资源即可,事件、攻击检测需要右键添加。

滚轮控制: 对于绿色部分滚轮负责缩放,蓝色左边部分,滚轮负责上下移动,蓝色右边滚轮负责左右移动。

image-20240408130924672

添加轨道

点击管理轨道来创建轨道,在选择轨道下拉框中,选择需要的轨道,点击添加。

可以看到面板上出现了对应的轨道。

技能播放

public class Skill_Player : MonoBehaviour

需要使用Skill_Player类来播放技能。

动画播放

具体的动画播放其实是要你自己实现的。

实现以下接口的类,来播放动画,在本项目中,我使用了自定义的Playable,来播放动画。

本项目中使用的Playable有一个小问题,连续播放统计一个技能时,判断为同一个动画Key就return了。可以根据自己的需要修改一下。

public interface ISkillAnimationPlayer
{
    public void PlayAnimation(string name, AnimationClip animationClip, float enterTIme);
    public void TrigerAnimationEvent(string eventName);
    public void ApplayRootMotion();
    public void PreventRootMotion();
}

具体如何实现ISkillAnimationPlayer可以参考:

public class TestAnimationPlayer : MonoBehaviour,ISkillAnimationPlayer

配置数据

点击任意Clip项都可以在Inspectors中看到对于Clip的数据,然后进行修改。

但是以下内置轨道不同。

Clip项都内置有右键复制、移动、删除等功能。

配置动画轨道

动画轨道有右键RootMotion事件,可以用右键点击来配置RootMotion。

配置事件轨道

通过右键Project窗口来创建Create-->AE技能编辑器-->事件列表事件列表。

点击事件Clip项,选择事件列表,之后可以配置事件名称。

配置攻击检测轨道

直接对场景中对应的脚本更改攻击检测参数,并且对场景中的攻击检测对象进行移动、旋转、缩放。

对于攻击检测的时间可以拖动Clip的尾部进行增加和缩短,再右键点击对准位置即可。

特效轨道

配置方式与攻击检测轨道一致。

直接对场景中的攻击检测对象进行移动、旋转、缩放。

再右键点击对准位置即可。

注意事项

如果你要用于工程中请将Auto保存打开,否则容易丢失数据。

请勿删除轨道脚本文件否则所有配置作废。

本项目配置依赖于Oding序列化,因为本项目的配置是使用字典,并使用Oding序列化字典。

添加轨道需要修改运行时代码,因为轨道类的转化是用字符串写死在Skill_Player中的,需要在Skill_Player添加轨道类。

ae_skill_editor's People

Contributors

ancientelement avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.