Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
摸鱼小分队
Unity 粒子特效方案:竹铃芝
提交
64a5aa72
Unity 粒子特效方案:竹铃芝
项目概览
摸鱼小分队
/
Unity 粒子特效方案:竹铃芝
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Unity 粒子特效方案:竹铃芝
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
64a5aa72
编写于
4月 19, 2023
作者:
魔术师Dix
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
添加粒子特效组的配置;
上级
94940a2f
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
71 addition
and
1 deletion
+71
-1
Assets/TouchFish.Omphalia/Core/ParticleConfig.cs
Assets/TouchFish.Omphalia/Core/ParticleConfig.cs
+1
-1
Assets/TouchFish.Omphalia/Core/ParticleGroupConfig.cs
Assets/TouchFish.Omphalia/Core/ParticleGroupConfig.cs
+59
-0
Assets/TouchFish.Omphalia/Core/ParticleGroupConfig.cs.meta
Assets/TouchFish.Omphalia/Core/ParticleGroupConfig.cs.meta
+11
-0
未找到文件。
Assets/TouchFish.Omphalia/Core/ParticleConfig.cs
浏览文件 @
64a5aa72
...
...
@@ -44,7 +44,7 @@ namespace TouchFish.Omphalia
/// 这个方法性能极差!只能在编辑器下使用!
/// </summary>
/// <param name="particle"></param>
public
void
AutoSetValu
e
(
Particle
particle
)
public
void
SetValueByUnityParticl
e
(
Particle
particle
)
{
m_Position
=
particle
.
GetPropertyValue
<
Vector3
>(
"m_Position"
);
m_Velocity
=
particle
.
GetPropertyValue
<
Vector3
>(
"m_Velocity"
);
...
...
Assets/TouchFish.Omphalia/Core/ParticleGroupConfig.cs
0 → 100644
浏览文件 @
64a5aa72
/*
*Copyright(C) 2023 by TouchFinsh All rights reserved.
*Unity版本:2020.3.43f1c1
*作者:Chief
*创建日期: 2023-04-19
*版本: 0.1
*/
using
System
;
using
System.Collections.Generic
;
using
UnityEngine
;
using
static
UnityEngine
.
ParticleSystem
;
namespace
TouchFish.Omphalia
{
/// <summary>
/// 粒子特效 分组配置
/// </summary>
[
Serializable
]
public
class
ParticleGroupConfig
{
/// <summary>
/// 所有的子物件例子特效配置
/// </summary>
public
ParticleConfig
[]
Particles
;
/// <summary>
/// 通过预制来生成
/// </summary>
/// <param name="SourceParticle"></param>
public
void
GenerateByGameObject
(
GameObject
SourceParticle
)
{
ParticleSystem
[]
particles
=
SourceParticle
.
GetComponentsInChildren
<
ParticleSystem
>();
int
length
=
particles
.
Length
;
Particle
[]
tempParticle
=
new
Particle
[
1
];
List
<
ParticleConfig
>
L
=
new
List
<
ParticleConfig
>(
length
);
for
(
int
i
=
0
;
i
<
length
;
i
++)
{
var
particle
=
particles
[
i
];
particle
.
Simulate
(
0.01f
);
particle
.
GetParticles
(
tempParticle
);
foreach
(
var
subP
in
tempParticle
)
{
ParticleConfig
param
=
new
ParticleConfig
();
param
.
SetValueByUnityParticle
(
subP
);
L
.
Add
(
param
);
}
}
Particles
=
L
.
ToArray
();
}
}
}
\ No newline at end of file
Assets/TouchFish.Omphalia/Core/ParticleGroupConfig.cs.meta
0 → 100644
浏览文件 @
64a5aa72
fileFormatVersion: 2
guid: 20cffb06a946b014fa8f29b4272a56db
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录