96 lines
2.3 KiB
C#
96 lines
2.3 KiB
C#
using Unity.Entities;
|
|
using Unity.Mathematics;
|
|
using Unity.NetCode;
|
|
using EE2Clone.Core;
|
|
|
|
namespace EE2Clone.NetCode
|
|
{
|
|
/// <summary>
|
|
/// Client requests to move selected units to a position.
|
|
/// </summary>
|
|
public struct MoveCommandRpc : IRpcCommand
|
|
{
|
|
public Entity UnitEntity;
|
|
public float3 TargetPosition;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Client requests to attack a target with selected units.
|
|
/// </summary>
|
|
public struct AttackCommandRpc : IRpcCommand
|
|
{
|
|
public Entity AttackerEntity;
|
|
public Entity TargetEntity;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Client requests to place a building.
|
|
/// </summary>
|
|
public struct PlaceBuildingRpc : IRpcCommand
|
|
{
|
|
public BuildingType Type;
|
|
public float3 Position;
|
|
public quaternion Rotation;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Client requests to set a rally point on a building.
|
|
/// </summary>
|
|
public struct SetRallyPointRpc : IRpcCommand
|
|
{
|
|
public Entity BuildingEntity;
|
|
public float3 Position;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Client requests to queue unit production in a building.
|
|
/// </summary>
|
|
public struct QueueUnitProductionRpc : IRpcCommand
|
|
{
|
|
public Entity BuildingEntity;
|
|
public int UnitDataId;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Client requests to gather from a resource node.
|
|
/// </summary>
|
|
public struct GatherCommandRpc : IRpcCommand
|
|
{
|
|
public Entity CitizenEntity;
|
|
public Entity ResourceNodeEntity;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Client requests to assign citizens to build/repair a building.
|
|
/// </summary>
|
|
public struct BuildRepairCommandRpc : IRpcCommand
|
|
{
|
|
public Entity CitizenEntity;
|
|
public Entity BuildingEntity;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Client requests to research a technology.
|
|
/// </summary>
|
|
public struct ResearchTechRpc : IRpcCommand
|
|
{
|
|
public Entity BuildingEntity;
|
|
public int TechId;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Client requests to advance to the next epoch.
|
|
/// </summary>
|
|
public struct EpochAdvanceRpc : IRpcCommand
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Client requests to stop selected units.
|
|
/// </summary>
|
|
public struct StopCommandRpc : IRpcCommand
|
|
{
|
|
public Entity UnitEntity;
|
|
}
|
|
}
|