20 lines
389 B
C#
20 lines
389 B
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
namespace BITKit.Entities
|
|
{
|
|
public class EntityIdComponent : EntityComponent
|
|
{
|
|
public ulong Id;
|
|
public string Name;
|
|
public override void Initialize(IEntity _entity)
|
|
{
|
|
if (Id is 0) Id = (ulong)Guid.NewGuid().GetHashCode();
|
|
base.Initialize(_entity);
|
|
_entity.Set(this);
|
|
}
|
|
}
|
|
}
|
|
|