Skip to content

Commit

Permalink
New version.
Browse files Browse the repository at this point in the history
  • Loading branch information
genaray committed Apr 29, 2024
1 parent 1d2e43f commit bcd2c21
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Arch.Extended.Sample/Arch.Extended.Sample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Arch" Version="1.2.8" />
<PackageReference Include="Arch" Version="1.2.8.1-alpha" />
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.1.303" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="Utf8Json" Version="1.3.7" />
Expand Down
1 change: 1 addition & 0 deletions Arch.Extended.Sample/Game.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ protected override void BeginRun()
StrictAllocationMode = false,
}
);
World.SharedJobScheduler = _jobScheduler;

// Spawn in entities with position, velocity and sprite
for (var index = 0; index < 1000; index++)
Expand Down
4 changes: 2 additions & 2 deletions Arch.Extended.Sample/Systems.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ public partial class MovementSystem : BaseSystem<World, GameTime>
/// <param name="time">The <see cref="GameTime"/>, passed by the "MoveQuery".</param>
/// <param name="pos">The <see cref="Position"/> of the <see cref="Entity"/>. Passed by the "MoveQuery".</param>
/// <param name="vel">The <see cref="Velocity"/> of the <see cref="Entity"/>. Passed by the "MoveQuery".</param>
[Query]
[Query(Parallel = true)]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Move([Data] GameTime time, ref Position pos, ref Velocity vel)
public static void Move([Data] GameTime time, ref Position pos, ref Velocity vel)
{
pos.Vector2 += time.ElapsedGameTime.Milliseconds * vel.Vector2;
}
Expand Down
4 changes: 2 additions & 2 deletions Arch.Persistence/Arch.Persistence.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
<RepositoryUrl>https://github.com/genaray/Arch.Extended.git</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>c#;.net;.net6;.net7;ecs;game;entity;gamedev; game-development; game-engine; entity-component-system; arch;</PackageTags>
<PackageReleaseNotes>Updated to Arch 1.2.7</PackageReleaseNotes>
<Version>1.0.3</Version>
<PackageReleaseNotes>Updated to Arch 1.2.8</PackageReleaseNotes>
<Version>1.0.4</Version>
<SatelliteResourceLanguages>en-US</SatelliteResourceLanguages>

<UnityPublish>true</UnityPublish>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@

<PackageId>Arch.System.SourceGenerator</PackageId>
<Title>Arch.System.SourceGenerator</Title>
<Version>1.1.4</Version>
<Version>1.2.0</Version>
<Authors>genaray</Authors>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<Description>A source generator for arch.system.</Description>
<PackageReleaseNotes>Data is now passed correctly into generated queries.
`@` in fromt of params is now accepted.
Added `World _world` to generated queries for making them usable in different worlds.
</PackageReleaseNotes>
<PackageReleaseNotes>Added #nullable enable to get rid of warnings.
Added @Query(Parallel = true) for generating parallel queries.
Some other small fixes. </PackageReleaseNotes>
<PackageTags>c#;.net;.net6;.net7;ecs;game;entity;gamedev; game-development; game-engine; entity-component-system; arch;</PackageTags>

<PackageProjectUrl>https://github.com/genaray/Arch.Extended</PackageProjectUrl>
Expand Down
4 changes: 3 additions & 1 deletion Arch.System.SourceGenerator/Query.cs
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ public static StringBuilder AppendQueryMethod(this StringBuilder sb, ref QueryMe

var template =
$$"""
#nullable enable
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
Expand Down Expand Up @@ -360,6 +361,7 @@ public static StringBuilder AppendParallelQueryMethod(this StringBuilder sb, ref

var template =
$$"""
#nullable enable
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
Expand All @@ -378,7 +380,7 @@ partial class {{queryMethod.ClassName}}{
Exclusive = {{exclusiveTypeArray}}
};

private {{staticModifier}} World? _{{queryMethod.MethodName}}_Initialized;
private {{staticModifier}} World _{{queryMethod.MethodName}}_Initialized;
private {{staticModifier}} Query _{{queryMethod.MethodName}}_Query;

[MethodImpl(MethodImplOptions.AggressiveInlining)]
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ Extensions for [Arch](https://github.com/genaray/Arch) with some useful features
Download the packages and get started today!
```console
dotnet add package Arch.System --version 1.0.5
dotnet add package Arch.System.SourceGenerator --version 1.1.4
dotnet add package Arch.System.SourceGenerator --version 1.2.0
dotnet add package Arch.EventBus --version 1.0.2
dotnet add package Arch.LowLevel --version 1.0.9
dotnet add package Arch.Relationships --version 1.0.0
dotnet add package Arch.Persistence --version 1.0.3
dotnet add package Arch.Persistence --version 1.0.4
dotnet add package Arch.AOT.SourceGenerator --version 1.0.1
```

Expand Down

0 comments on commit bcd2c21

Please sign in to comment.