obsidian/笔记文件/2.笔记/特效音效编辑器_第一章.md
2025-03-26 00:02:56 +08:00

203 lines
4.5 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

销毁和删除逻辑
技能轨道基类,有包含删除逻辑的虚函数
![[Pasted image 20240311153057.png]]
也就是在对应的动画数据集合,删除即可
![[Pasted image 20240311153122.png]]
对应属性面板的,删除逻辑
![[Pasted image 20240311153150.png]]
![[Pasted image 20240311153232.png]]
技能基类,还有一个销毁函数,分别是动画、音效、特效轨道类,都有重写的
![[Pasted image 20240311153300.png]]
其中,样式基类中,也新增了,对应的销毁函数,从对应的,显示要素根节点,和父节点
![[Pasted image 20240311153401.png]]
技能编辑器面板,有一个轨道汇总的,销毁逻辑调用
![[Pasted image 20240311153525.png]]
如果没有对应的技能配置文件,调用各个轨道的销毁函数
![[Pasted image 20240311153610.png]]
动画、音效、特效,三者的重写销毁函数,分别是:
样式的销毁、特效列表的销毁
![[Pasted image 20240311153703.png]]
![[Pasted image 20240311153731.png]]
遍历,然后销毁对应的,游戏实体
![[Pasted image 20240311153806.png]]
新增了特效和音效轨道之后,表现:
![[Pasted image 20240311154038.png]]
其中,这俩轨道的,左边样式,都是用的这俩;
SkillMultilineTrackStyle类也继承自轨道样式基类
![[Pasted image 20240311154804.png]]
表现
![[Pasted image 20240311155649.png]]
![[Pasted image 20240311155701.png]]
![[Pasted image 20240311155721.png]]
子规道类
![[Pasted image 20240311155753.png]]
对应表现
![[Pasted image 20240311155803.png]]
![[Pasted image 20240311155833.png]]
![[Pasted image 20240311155850.png]]
回到技能编辑器相关类,也会新增,两个初始化:音频、特效
![[Pasted image 20240311155921.png]]
![[Pasted image 20240311155955.png]]
![[Pasted image 20240311160002.png]]
回到配置文件,相关逻辑,也是新增了,两个资源集合:音效,特效
![[Pasted image 20240311160319.png]]
对应结构体
![[Pasted image 20240311160357.png]]
![[Pasted image 20240311160404.png]]
![[Pasted image 20240311160415.png]]
![[Pasted image 20240311160421.png]]
测试的技能配置文件:
![[Pasted image 20240311160457.png]]
这是音效轨道的逻辑类
![[Pasted image 20240311160612.png]]
分别是创建对应的右侧AudioTrackItem类同步配置添加子轨道相关逻辑
![[Pasted image 20240311161529.png]]
添加子轨道:
![[Pasted image 20240311161702.png]]
对应的触发逻辑调用
![[Pasted image 20240311162144.png]]
![[Pasted image 20240311162156.png]]
然后,就是检测和删除,子轨道、子轨道之间,交换逻辑,还有销毁自身逻辑的重写
![[Pasted image 20240311164155.png]]
表现
![[Pasted image 20240311164423.png]]
删除按钮,对应删除逻辑的调用
![[Pasted image 20240311164406.png]]
左侧列表对应的ui表现是一个显示要素
![[Pasted image 20240311164952.png]]
对应的交互函数注册:鼠标点击、拖曳、抬起、移出
![[Pasted image 20240311165057.png]]
点击逻辑,就是消选旧的子轨道,然后根据鼠标位置,换算得到,点击的轨道索引
![[Pasted image 20240311165147.png]]
换算逻辑,也就是根据子轨道列表,去换算即可
![[Pasted image 20240311165246.png]]
选中的颜色
![[Pasted image 20240311165349.png]]
![[Pasted image 20240311165403.png]]
鼠标移动,注册的逻辑,就是调用了,音轨轨道逻辑类的,交换逻辑
![[Pasted image 20240311165419.png]]
![[Pasted image 20240311165514.png]]
鼠标抬起和移出就相对简单光标不在ui上就把拖曳的布尔判断设为false即可
![[Pasted image 20240311165551.png]]
子轨道的样式类,和混合轨道类,是同一个文件的
![[Pasted image 20240311165828.png]]
添加子轨道的逻辑入口
![[Pasted image 20240311165915.png]]
调用,也是音频轨道类的创建逻辑
![[Pasted image 20240311170045.png]]
删除子轨道数据和显示的相关逻辑
![[Pasted image 20240311170121.png]]
调用子轨道的位置更新逻辑
![[Pasted image 20240311170225.png]]
![[Pasted image 20240311170246.png]]
这是可输入文本
![[Pasted image 20240311170602.png]]
ui控件
![[Pasted image 20240311170712.png]]
对应逻辑,和键入键出的逻辑,对应注册
![[Pasted image 20240311170733.png]]
也就是变更子轨道名字,触发修改,修改和保存,相关配置文件
![[Pasted image 20240311170804.png]]
![[Pasted image 20240311170919.png]]