mirror of
https://github.com/tym1116/BH3.git
synced 2025-12-12 22:44:35 +01:00
41 lines
842 B
C#
41 lines
842 B
C#
using UnityEngine;
|
|
|
|
namespace MoleMole
|
|
{
|
|
public class MonoEffectPluginSkinMeshShape : BaseMonoEffectPlugin
|
|
{
|
|
[Header("Skin mesh attach point")]
|
|
public string skinMeshAttachPoint;
|
|
|
|
[Header("Target particle system")]
|
|
public ParticleSystem targetParticleSystem;
|
|
|
|
private ParticleSystem.ShapeModule _shapeModule;
|
|
|
|
public override void Setup()
|
|
{
|
|
base.Setup();
|
|
_shapeModule = targetParticleSystem.shape;
|
|
}
|
|
|
|
public void SetupSkinmesh(BaseMonoEntity entity)
|
|
{
|
|
Transform attachPoint = entity.GetAttachPoint(skinMeshAttachPoint);
|
|
SkinnedMeshRenderer component = attachPoint.GetComponent<SkinnedMeshRenderer>();
|
|
if (!(component == null))
|
|
{
|
|
_shapeModule.skinnedMeshRenderer = component;
|
|
}
|
|
}
|
|
|
|
public override bool IsToBeRemove()
|
|
{
|
|
return false;
|
|
}
|
|
|
|
public override void SetDestroy()
|
|
{
|
|
}
|
|
}
|
|
}
|