using Unity.Entities; using Unity.Mathematics; using Unity.NetCode; using EE2Clone.Core; namespace EE2Clone.Components { [GhostComponent] public struct Health : IComponentData { [GhostField] public float Current; [GhostField] public float Max; } [GhostComponent] public struct OwnerPlayer : IComponentData { [GhostField] public int PlayerId; } [GhostComponent] public struct MovementSpeed : IComponentData { [GhostField] public float Value; } [GhostComponent] public struct MoveTarget : IComponentData { [GhostField] public float3 Position; [GhostField] public bool IsActive; } [GhostComponent] public struct AttackData : IComponentData { [GhostField] public float Damage; [GhostField] public float Range; [GhostField] public float AttackCooldown; public float CooldownRemaining; } [GhostComponent] public struct ArmorData : IComponentData { [GhostField] public float Value; } [GhostComponent] public struct UnitClassComponent : IComponentData { [GhostField] public UnitClass Value; } [GhostComponent] public struct UnitStateComponent : IComponentData { [GhostField] public UnitState Value; } [GhostComponent] public struct ResourceNode : IComponentData { [GhostField] public ResourceType Type; [GhostField] public int RemainingAmount; } [GhostComponent] public struct CarriedResource : IComponentData { [GhostField] public ResourceType Type; [GhostField] public int Amount; [GhostField] public int MaxCarryCapacity; } [GhostComponent] public struct GatherTarget : IComponentData { [GhostField] public Entity Target; } [GhostComponent] public struct BuildTarget : IComponentData { [GhostField] public Entity Target; } [GhostComponent] public struct ConstructionProgress : IComponentData { [GhostField] public float Progress; // 0.0 to 1.0 [GhostField] public float BuildTime; // Total time required } [GhostComponent] public struct ProductionTimer : IComponentData { [GhostField] public float TimeRemaining; [GhostField] public float TotalTime; } [GhostComponent] public struct RallyPoint : IComponentData { [GhostField] public float3 Position; } [GhostComponent] public struct TerritorySource : IComponentData { [GhostField] public float Radius; } [GhostComponent] public struct LineOfSight : IComponentData { [GhostField] public float Range; } [GhostComponent] public struct EpochLevel : IComponentData { [GhostField] public Epoch Value; } [GhostComponent] public struct CitizenStateComponent : IComponentData { [GhostField] public CitizenState Value; } [GhostComponent] public struct DropoffBuilding : IComponentData { [GhostField] public ResourceType AcceptedType; } [GhostComponent] public struct CombatTarget : IComponentData { [GhostField] public Entity Target; } [GhostComponent] public struct BuildingTypeComponent : IComponentData { [GhostField] public BuildingType Value; } [GhostComponent] public struct ProvidesPopulation : IComponentData { [GhostField] public int Amount; } public struct ProjectileData : IComponentData { [GhostField] public Entity Target; [GhostField] public float Damage; [GhostField] public float Speed; [GhostField] public int OwnerPlayerId; } public struct DeathTimer : IComponentData { public float TimeRemaining; } }