blob: d03713e6813371d7e4144857d68b08ca4c138f1f (
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
|
using UnityEngine;
public class PerkIndestructible : MonoBehaviour
{
[SerializeField]
private Equippable indestructiblePerk;
private void Start()
{
if (PerkManager.IsEquipped(indestructiblePerk))
{
TaggedObject componentInChildren = GetComponentInChildren<TaggedObject>();
if ((bool)componentInChildren)
{
componentInChildren.RemoveTag(TagManager.ETag.PlayerOwned);
}
}
Object.Destroy(this);
}
private void Update()
{
}
}
|