Game/Assets/Scripts/shield.cs
2021-01-16 18:29:12 +01:00

19 lines
370 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class shield : MonoBehaviour
{
public float duration;
private void Update()
{
duration -= Time.deltaTime;
if(duration <= 0)
{
this.gameObject.transform.parent.tag = "Player";
Destroy(this.gameObject);
}
}
}