Game/Assets/Scripts/shield.cs

19 lines
370 B
C#
Raw Permalink Normal View History

2021-01-16 18:29:12 +01:00
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);
}
}
}