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;
|
|
}
|
|
}
|
|
}
|