mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
29 lines
601 B
C#
29 lines
601 B
C#
using System;
|
|
using MongoDB.Bson.Serialization.Attributes;
|
|
using TrueSync;
|
|
|
|
namespace ET
|
|
{
|
|
[ChildOf(typeof(LSUnitComponent))]
|
|
public class LSUnit: LSEntity, IAwake, ISerializeToEntity
|
|
{
|
|
public TSVector Position
|
|
{
|
|
get;
|
|
set;
|
|
}
|
|
|
|
[BsonIgnore]
|
|
public TSVector Forward
|
|
{
|
|
get => this.Rotation * TSVector.forward;
|
|
set => this.Rotation = TSQuaternion.LookRotation(value, TSVector.up);
|
|
}
|
|
|
|
public TSQuaternion Rotation
|
|
{
|
|
get;
|
|
set;
|
|
}
|
|
}
|
|
} |