feat: add agent skill documentation
Add new skill documentation files for developing OECS, testing games, and writing games. Also update the API surface documentation to include guidance on component and command definitions.
This commit is contained in:
+6
-2
@@ -461,19 +461,23 @@ public class ComponentEntry
|
||||
|
||||
## Usage Example
|
||||
|
||||
Components and commands should be `public record struct` types with explicit
|
||||
fields/properties (not positional syntax). See the `writing-games` skill for
|
||||
the rationale.
|
||||
|
||||
```csharp
|
||||
using OECS;
|
||||
|
||||
// Define components
|
||||
[MessagePackObject]
|
||||
public struct Position
|
||||
public record struct Position
|
||||
{
|
||||
[Key(0)] public float X;
|
||||
[Key(1)] public float Y;
|
||||
}
|
||||
|
||||
[MessagePackObject]
|
||||
public struct Velocity
|
||||
public record struct Velocity
|
||||
{
|
||||
[Key(0)] public float X;
|
||||
[Key(1)] public float Y;
|
||||
|
||||
Reference in New Issue
Block a user