更新
This commit is contained in:
@@ -22,12 +22,12 @@ namespace Cielonos.MainGame
|
||||
public partial class VFXData
|
||||
{
|
||||
//Runtime
|
||||
|
||||
[NonSerialized]
|
||||
private Transform executorTransform;
|
||||
[NonSerialized] private CharacterBase executor;
|
||||
[NonSerialized] private Transform executorTransform;
|
||||
|
||||
public void Initialize(CharacterBase character)
|
||||
{
|
||||
executor = character;
|
||||
executorTransform = character.transform;
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Cielonos.MainGame
|
||||
VFXUnit vfxUnit = Get(vfxName);
|
||||
|
||||
Transform startTransform = overrideStartTransform ?? executorTransform;
|
||||
GameObject vfxInstance = LeanPool.Spawn(vfxUnit.mainVFX, startTransform);
|
||||
GameObject vfxInstance = VFXObject.Spawn(vfxUnit.mainVFX, executor, startTransform);
|
||||
Transform vfxTransform = vfxInstance.transform;
|
||||
|
||||
vfxTransform.localPosition = vfxUnit.localPosition;
|
||||
@@ -53,12 +53,12 @@ namespace Cielonos.MainGame
|
||||
|
||||
public GameObject SpawnMuzzleVFX(string effectName, Transform muzzleTransform)
|
||||
{
|
||||
return LeanPool.Spawn(Get(effectName).muzzleVFX, muzzleTransform);
|
||||
return VFXObject.Spawn(Get(effectName).muzzleVFX, executor, muzzleTransform);
|
||||
}
|
||||
|
||||
public GameObject SpawnHitVFX(string effectName, Vector3 hitPosition)
|
||||
{
|
||||
return LeanPool.Spawn(Get(effectName).muzzleVFX, hitPosition, Quaternion.identity);
|
||||
return VFXObject.Spawn(Get(effectName).muzzleVFX, executor, hitPosition, Quaternion.identity);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user