mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
18 lines
512 B
C#
18 lines
512 B
C#
namespace ET
|
|
{
|
|
public static partial class LSUnitFactory
|
|
{
|
|
public static LSUnit Init(LSWorld lsWorld, LockStepUnitInfo unitInfo)
|
|
{
|
|
LSUnitComponent lsUnitComponent = lsWorld.GetComponent<LSUnitComponent>();
|
|
LSUnit lsUnit = lsUnitComponent.AddChildWithId<LSUnit>(unitInfo.PlayerId);
|
|
|
|
lsUnit.Position = unitInfo.Position;
|
|
lsUnit.Rotation = unitInfo.Rotation;
|
|
|
|
lsUnit.AddComponent<LSInputComponent>();
|
|
return lsUnit;
|
|
}
|
|
}
|
|
}
|