2026-05-21 스킬예측(진행중)
This commit is contained in:
21
Assets/Hovl Studio/HSFiles/Scripts/HS_CallBackParent.cs
Normal file
21
Assets/Hovl Studio/HSFiles/Scripts/HS_CallBackParent.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class HS_CallBackParent : MonoBehaviour
|
||||
{
|
||||
[SerializeField]protected Transform parentObject;
|
||||
|
||||
//Particle system must have "Stop action - Callback" enabled for normal work.
|
||||
protected virtual void OnParticleSystemStopped()
|
||||
{
|
||||
if (parentObject != null)
|
||||
{
|
||||
transform.parent = parentObject;
|
||||
transform.localPosition = Vector3.zero;
|
||||
transform.localEulerAngles = Vector3.zero;
|
||||
}
|
||||
else
|
||||
Destroy(gameObject);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user