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

namespace Onward.CustomContent.Assets
{
    public class Entity : MonoBehaviour
    {
        public int EntityId
        {
            get => m_id;
        }

        //[SerializeField]
        private int m_id = -1;

        public virtual void Validate()
        {
            if (m_id == -1)
                throw new ContentExceptionWithGameObject(gameObject, "Invalid id for GameObject.");
        }

        public void SetId(int id)
        {
            m_id = id;
        }
    }
}