17 lines
369 B
C#
17 lines
369 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class EnemyAim : MonoBehaviour{
|
|
|
|
Transform player;
|
|
|
|
void Start(){
|
|
player = GameObject.FindGameObjectWithTag("Player").transform;
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void LateUpdate(){
|
|
transform.LookAt(player.position, Vector3.back);
|
|
}
|
|
}
|