27 lines
422 B
C#
27 lines
422 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class NPCimproved : MonoBehaviour
|
|
{
|
|
// Animator animator;
|
|
public Animator animator;
|
|
void Start()
|
|
{
|
|
|
|
}
|
|
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
|
|
void OnCollisionEnter(Collision col) {
|
|
|
|
if (col.gameObject.tag == "Player")
|
|
{
|
|
animator.SetTrigger("hit");
|
|
}
|
|
}
|
|
}
|