summaryrefslogtreecommitdiff
path: root/Thronefall_v1.0/Decompile/DestroyOrDisableOnEnable.cs
blob: 5879f90ae351628d1195289dfb650cb784e80b5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using UnityEngine;

public class DestroyOrDisableOnEnable : MonoBehaviour
{
	[SerializeField]
	private Hp[] destroy;

	[SerializeField]
	private GameObject[] disable;

	private void OnEnable()
	{
		Hp[] array = destroy;
		foreach (Hp hp in array)
		{
			if (hp.gameObject.activeInHierarchy)
			{
				hp.TakeDamage(1E+09f);
			}
		}
		GameObject[] array2 = disable;
		for (int i = 0; i < array2.Length; i++)
		{
			array2[i].SetActive(value: false);
		}
	}
}