20 lines
558 B
C#
20 lines
558 B
C#
using System;
|
|
using UnityEngine;
|
|
|
|
namespace Saltosion.OneWeapon.AI {
|
|
[RequireComponent(typeof(AI.Behaviours.Follow), typeof(AI.Triggers.PlayerSighted))]
|
|
[Obsolete]
|
|
public class PlayerFollower : MonoBehaviour {
|
|
public AI.Behaviours.Follow Follow;
|
|
public AI.Triggers.PlayerSighted PlayerSighted;
|
|
|
|
private void Update() {
|
|
if (PlayerSighted.Player == null) {
|
|
Follow.Target = null;
|
|
} else {
|
|
Follow.Target = PlayerSighted.Player.transform;
|
|
}
|
|
}
|
|
}
|
|
}
|