using System; using System.Collections; using System.Collections.Generic; using UnityEngine; namespace Gameplay.Camp { /// /// 营地单位基类 /// public abstract class CampUnitBase : IDisposable { /// /// 根节点 /// public GameObject GoRoot { get; private set; } public CampUnitBase(GameObject root) { GoRoot = root; } public virtual void SetPos(Vector3 vector3) { GoRoot.transform.position = vector3; } public virtual void Dispose() { if (null != GoRoot) UnityEngine.Object.Destroy(GoRoot); } } }