您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
19 行
703 B
19 行
703 B
using Unity.Entities;
|
|
using UnityEngine;
|
|
|
|
public class AbilityMovementAuthoring : MonoBehaviour, IConvertGameObjectToEntity
|
|
{
|
|
public AbilityMovement.Settings settings;
|
|
|
|
public void Convert(Entity entity, EntityManager dstManager, GameObjectConversionSystem conversionSystem)
|
|
{
|
|
dstManager.AddComponentData(entity, new Ability.AbilityTag { Value = Ability.AbilityTagValue.Movement });
|
|
dstManager.AddComponentData(entity,settings);
|
|
dstManager.AddComponentData(entity, new AbilityMovement.PredictedState());
|
|
dstManager.AddComponentData(entity, new AbilityMovement.InterpolatedState());
|
|
|
|
#if UNITY_EDITOR
|
|
dstManager.SetName(entity,name);
|
|
#endif
|
|
}
|
|
}
|