19 lines
370 B
C#
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);
|
|
}
|
|
}
|
|
}
|