//------------------------------------------------------------
// Game Framework
// Copyright © 2013-2021 Jiang Yin. All rights reserved.
// Homepage: https://gameframework.cn/
// Feedback: mailto:ellan@gameframework.cn
//------------------------------------------------------------
using System;
using UnityEngine;
namespace GeometryTD.Entity.EntityData
{
[Serializable]
public abstract class EntityDataBase
{
[SerializeField] private int _id = 0;
[SerializeField] private int _typeId = 0;
[SerializeField] private Vector3 _position = Vector3.zero;
[SerializeField] private Quaternion _rotation = Quaternion.identity;
public EntityDataBase(int entityId, int typeId)
{
_id = entityId;
_typeId = typeId;
}
///
/// 生成的实体编号。
///
public int Id => _id;
///
/// 实体类型编号(外键)。
///
public int TypeId => _typeId;
///
/// 实体位置。
///
public Vector3 Position
{
get => _position;
set => _position = value;
}
///
/// 实体朝向。
///
public Quaternion Rotation
{
get => _rotation;
set => _rotation = value;
}
}
}