using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Framework.DataHandling
{
    [Serializable]
    public class DataID
    {
        private string prefabName;
        private int id; 

        public DataID(string prefabName, int id)
        {
            this.prefabName = prefabName;
            this.id = id;
        }

        public string GetPrefabName()
        {
            return this.prefabName;
        }

        public int GetID()
        {
            return this.id;
        }

        public override string ToString()
        {
            return this.prefabName + " " + this.id;
        }

        public override int GetHashCode()
        {
            return base.GetHashCode();
        }

        public override bool Equals(object dataID)
        {
            return ((DataID)dataID).GetID() == GetID();
        }
    }
}
