metahunt/Assets/BloodAndDamage/KriptoFX/BloodFX/Others/DemoReactivator.cs
2024-02-11 13:53:18 +05:30

22 lines
487 B
C#

using UnityEngine;
using System.Collections;
public class DemoReactivator : MonoBehaviour {
public float TimeDelayToReactivate = 3;
// Use this for initialization
void Start () {
InvokeRepeating("Reactivate", 0, TimeDelayToReactivate );
}
// Update is called once per frame
void Reactivate ()
{
var childs = GetComponentsInChildren<Transform>();
foreach (var child in childs) {
child.gameObject.SetActive(false);
child.gameObject.SetActive(true);
}
}
}