RoadKill
This commit is contained in:
26
Assets/Scripts/NPC improved.cs
Normal file
26
Assets/Scripts/NPC improved.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
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");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user