16 lines
400 B
C#
16 lines
400 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class Stunning : MonoBehaviour
|
|
{
|
|
[SerializeField]
|
|
private float duration;
|
|
|
|
private void OnCollisionEnter(Collision other) {
|
|
if(other.gameObject.tag.Equals("Player")){//Collided w/ player, stun him
|
|
other.gameObject.GetComponent<PlayerController>().Stun(duration);
|
|
}
|
|
}
|
|
}
|