using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UDB;
using cowsins;

public class PlayerTarget : CachedMonoBehaviour
{
    public static List<Transform> targets = new List<Transform>();
    public static List<PlayerStats> playerStats = new List<PlayerStats>();
    // Start is called before the first frame update
    void Start()
    {
        if(playerStats.Contains(GetComponent<PlayerStats>()) == false) playerStats.Add(GetComponent<PlayerStats>());
        if(targets.Contains(transform) == false) targets.Add(transform);
    }

    void OnDestroy()
    {
        if(playerStats.Contains(GetComponent<PlayerStats>())) playerStats.Remove(GetComponent<PlayerStats>());
        if(targets.Contains(transform)) targets.Remove(transform);
    }
}
