22 lines
652 B
C#
Executable File
22 lines
652 B
C#
Executable File
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
[RequireComponent(typeof(BoxCollider))]
|
|
public class NavPoint : MonoBehaviour
|
|
{
|
|
public Vector3 position => gameObject.transform.position;
|
|
public int PointId => this.GetInstanceID();
|
|
public float FlagDistance { get; private set; }
|
|
|
|
[HideInInspector]
|
|
public float DeathAttr = 0;
|
|
public List<Vector3> EnemiesSeen = new List<Vector3>();
|
|
//Here other attributes;
|
|
|
|
private void Start()
|
|
{
|
|
FlagDistance = (GameObject.FindGameObjectWithTag("Flag").transform.position - position).magnitude;
|
|
}
|
|
}
|