demo2
This commit is contained in:
@@ -0,0 +1,127 @@
|
||||
#nullable enable
|
||||
|
||||
using Demo2.Domain;
|
||||
using Unity.Collections;
|
||||
using Unity.Entities;
|
||||
|
||||
namespace Demo2.ECS
|
||||
{
|
||||
public struct Demo2SimulationState : IComponentData
|
||||
{
|
||||
public long Tick;
|
||||
public ulong Seed;
|
||||
public Demo2Phase Phase;
|
||||
public int Cycle;
|
||||
public int NextStableId;
|
||||
public int RuleAppliedCycle;
|
||||
public ulong StateHash;
|
||||
public int SpeedMultiplier;
|
||||
}
|
||||
|
||||
public struct Demo2EconomyState : IComponentData
|
||||
{
|
||||
public long Money;
|
||||
public long Payload;
|
||||
public long MultiplierMilli;
|
||||
public long Energy;
|
||||
public long ExcessFirepower;
|
||||
}
|
||||
|
||||
public struct Demo2StableId : IComponentData { public int Value; }
|
||||
public struct Demo2GridPosition : IComponentData { public short X; public short Y; }
|
||||
|
||||
public struct Demo2MachineState : IComponentData
|
||||
{
|
||||
public Demo2MachineKind Kind;
|
||||
public byte Rotation;
|
||||
public byte Enabled;
|
||||
public int RecipeId;
|
||||
public int ProgressTicks;
|
||||
public int ProcessTicks;
|
||||
public int StoredInput;
|
||||
public int Capacity;
|
||||
public int PendingOutputs;
|
||||
public int Faults;
|
||||
}
|
||||
|
||||
public struct Demo2RecipeState : IComponentData
|
||||
{
|
||||
public Demo2MaterialKind InputA;
|
||||
public Demo2MaterialKind InputB;
|
||||
public Demo2MaterialKind Output;
|
||||
public int InputCountA;
|
||||
public int InputCountB;
|
||||
public int OutputCount;
|
||||
}
|
||||
|
||||
public struct Demo2ConveyorState : IComponentData
|
||||
{
|
||||
public byte Direction;
|
||||
public int Occupancy;
|
||||
public int Capacity;
|
||||
}
|
||||
|
||||
public struct Demo2MaterialState : IComponentData
|
||||
{
|
||||
public Demo2MaterialKind Kind;
|
||||
public int Quantity;
|
||||
public int SubCellProgress;
|
||||
public byte Direction;
|
||||
}
|
||||
|
||||
public struct Demo2TurretAmmo : IComponentData { public long Value; }
|
||||
public struct Demo2CoreHealth : IComponentData { public int Value; }
|
||||
|
||||
public struct Demo2CycleStats : IComponentData
|
||||
{
|
||||
public long Extracted;
|
||||
public long Transported;
|
||||
public long Processed;
|
||||
public long AmmoProduced;
|
||||
public int CompletedSameRecipeStreak;
|
||||
public int LastRecipeId;
|
||||
public int Faults;
|
||||
public int BeltOccupancy;
|
||||
public int BeltCapacity;
|
||||
public byte IronFuelAdjacent;
|
||||
public byte FirstBatch;
|
||||
public int DuplicateNextOutputs;
|
||||
}
|
||||
|
||||
[InternalBufferCapacity(32)]
|
||||
public struct Demo2BuildCommandElement : IBufferElementData
|
||||
{
|
||||
public long Sequence;
|
||||
public FixedString64Bytes IdempotencyToken;
|
||||
public FixedString32Bytes PlayerId;
|
||||
public Demo2MachineKind Kind;
|
||||
public short X;
|
||||
public short Y;
|
||||
public byte Rotation;
|
||||
public int RecipeId;
|
||||
public byte Remove;
|
||||
}
|
||||
|
||||
[InternalBufferCapacity(64)]
|
||||
public struct Demo2ProcessedCommandToken : IBufferElementData { public FixedString64Bytes Value; }
|
||||
|
||||
[InternalBufferCapacity(32)]
|
||||
public struct Demo2RuleInstruction : IBufferElementData
|
||||
{
|
||||
public Demo2RuleOpcode Opcode;
|
||||
public Demo2RuleCondition Condition;
|
||||
public long Operand;
|
||||
public int Slot;
|
||||
}
|
||||
|
||||
public struct Demo2RuleInstructionBlob
|
||||
{
|
||||
public Demo2RuleOpcode Opcode;
|
||||
public Demo2RuleCondition Condition;
|
||||
public long Operand;
|
||||
public int Slot;
|
||||
}
|
||||
|
||||
public struct Demo2RuleProgramBlob { public BlobArray<Demo2RuleInstructionBlob> Instructions; }
|
||||
public struct Demo2RuleProgram : IComponentData { public BlobAssetReference<Demo2RuleProgramBlob> Value; }
|
||||
}
|
||||
Reference in New Issue
Block a user