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