29 lines
730 B
C#
Executable File
29 lines
730 B
C#
Executable File
using System.Collections.Generic;
|
|
using System;
|
|
using UnityEngine;
|
|
|
|
public enum NavPointType
|
|
{
|
|
Cover,
|
|
Direction,
|
|
}
|
|
|
|
|
|
public class NavPoint : MonoBehaviour
|
|
{
|
|
public Vector3 Position => gameObject.transform.position;
|
|
public float FlagDistance { get; private set; }
|
|
|
|
[SerializeField] public NavPointType navType;
|
|
[HideInInspector] public bool isOcuppied;
|
|
|
|
[HideInInspector] public int PointId = 0;
|
|
[HideInInspector] public float DeathAttr = 0;
|
|
[HideInInspector] public List<Vector3> EnemiesSeen = new List<Vector3>();
|
|
|
|
private void Start()
|
|
{
|
|
FlagDistance = (GameObject.FindGameObjectWithTag("Flag").transform.position - Position).magnitude;
|
|
}
|
|
}
|