﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

/// <summary>
/// 叶子节点类，负责坐标与数据的映射(T一般是gameobject即可)
/// </summary>
/// <typeparam name="T"></typeparam>
public class QuadTreeLeaf<T>
{
    private Vector2 pos;
    private T refObject;

    public QuadTreeLeaf(Vector2 pos, T obj)
    {
        this.pos = pos;
        refObject = obj;
    }

    public T LeafObject
    {
        get
        {
            return refObject;
        }
    }

    public Vector2 Pos
    {
        get { return pos; }
        set { pos = value; }
    }
}