您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

32 行
982 B

using UnityEngine;
using Unity.Entities;
using Unity.Mathematics;
public struct ProjectileRequest : IComponentData
{
public static void Create(EntityCommandBuffer commandBuffer, int tick, int tickDelay, uint projectileRegistryId, Entity owner, int teamId, float3 startPosition, float3 endPosition)
{
var request = new ProjectileRequest
{
projectileTypeRegistryId = projectileRegistryId,
startTick = tick,
startPosition = startPosition,
endPosition = endPosition,
owner = owner,
collisionTestTickDelay = tickDelay,
teamId = teamId,
};
commandBuffer.CreateEntity();
commandBuffer.AddComponent(request);
}
public uint projectileTypeRegistryId;
public int startTick;
public float3 startPosition;
public float3 endPosition;
public Entity owner;
public int teamId;
public int collisionTestTickDelay;
}