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