|
|
@@ -1,5 +1,4 @@
|
|
|
using System.Diagnostics;
|
|
|
-using MemoryPack;
|
|
|
using MongoDB.Bson.Serialization.Attributes;
|
|
|
using Unity.Mathematics;
|
|
|
|
|
|
@@ -7,16 +6,13 @@ namespace ET
|
|
|
{
|
|
|
[ChildOf(typeof(UnitComponent))]
|
|
|
[DebuggerDisplay("ViewName,nq")]
|
|
|
- [MemoryPackable]
|
|
|
public partial class Unit: Entity, IAwake<int>
|
|
|
{
|
|
|
public int ConfigId { get; set; } //配置表id
|
|
|
|
|
|
- [MemoryPackInclude]
|
|
|
[BsonElement]
|
|
|
private float3 position; //坐标
|
|
|
|
|
|
- [MemoryPackIgnore]
|
|
|
[BsonIgnore]
|
|
|
public float3 Position
|
|
|
{
|
|
|
@@ -29,7 +25,6 @@ namespace ET
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- [MemoryPackIgnore]
|
|
|
[BsonIgnore]
|
|
|
public float3 Forward
|
|
|
{
|
|
|
@@ -37,11 +32,9 @@ namespace ET
|
|
|
set => this.Rotation = quaternion.LookRotation(value, math.up());
|
|
|
}
|
|
|
|
|
|
- [MemoryPackInclude]
|
|
|
[BsonElement]
|
|
|
private quaternion rotation;
|
|
|
|
|
|
- [MemoryPackIgnore]
|
|
|
[BsonIgnore]
|
|
|
public quaternion Rotation
|
|
|
{
|