mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
[+] 接入ET8服务端
[+] 接入ET8服务端
This commit is contained in:
29
Assets/GameScripts/DotNet/Model/Share/LockStep/LSUnit.cs
Normal file
29
Assets/GameScripts/DotNet/Model/Share/LockStep/LSUnit.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user