Skip to content

Commit

Permalink
[v0.1.1] Dependency updated
Browse files Browse the repository at this point in the history
  • Loading branch information
g0dzZz-coder committed Jan 7, 2024
1 parent f79bfca commit de4e9c6
Show file tree
Hide file tree
Showing 12 changed files with 35 additions and 23 deletions.
5 changes: 3 additions & 2 deletions Runtime/AnimatorRef.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// SPDX-License-Identifier: Apache-2.0
// © 2023 Nikolay Melnikov <n.melnikov@depra.org>
// © 2023-2024 Nikolay Melnikov <n.melnikov@depra.org>

using Depra.Ecs.QoL.Components;
using UnityEngine;

namespace Depra.Ecs.Components
{
public struct AnimatorRef
public struct AnimatorRef : IComponent
{
public Animator Value;
}
Expand Down
5 changes: 3 additions & 2 deletions Runtime/CameraRef.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// SPDX-License-Identifier: Apache-2.0
// © 2023 Nikolay Melnikov <n.melnikov@depra.org>
// © 2023-2024 Nikolay Melnikov <n.melnikov@depra.org>

using Depra.Ecs.QoL.Components;
using UnityEngine;

namespace Depra.Ecs.Components
{
public struct CameraRef
public struct CameraRef : IComponent
{
public Camera Value;
}
Expand Down
5 changes: 3 additions & 2 deletions Runtime/CharacterControllerRef.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// SPDX-License-Identifier: Apache-2.0
// © 2023 Nikolay Melnikov <n.melnikov@depra.org>
// © 2023-2024 Nikolay Melnikov <n.melnikov@depra.org>

using Depra.Ecs.QoL.Components;
using UnityEngine;

namespace Depra.Ecs.Components
{
public struct CharacterControllerRef
public struct CharacterControllerRef : IComponent
{
public CharacterController Value;
}
Expand Down
3 changes: 2 additions & 1 deletion Runtime/Depra.Ecs.Components.asmdef
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"allowUnsafeCode": false,
"overrideReferences": true,
"precompiledReferences": [
"Depra.Ecs.dll"
"Depra.Ecs.dll",
"Depra.Ecs.QoL.dll"
],
"autoReferenced": true,
"defineConstraints": [],
Expand Down
5 changes: 3 additions & 2 deletions Runtime/LineRendererRef.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// SPDX-License-Identifier: Apache-2.0
// © 2023 Nikolay Melnikov <n.melnikov@depra.org>
// © 2023-2024 Nikolay Melnikov <n.melnikov@depra.org>

using Depra.Ecs.QoL.Components;
using UnityEngine;

namespace Depra.Ecs.Components
{
public struct LineRendererRef
public struct LineRendererRef : IComponent
{
public LineRenderer Value;
}
Expand Down
5 changes: 3 additions & 2 deletions Runtime/RigidbodyForceMode.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// SPDX-License-Identifier: Apache-2.0
// © 2023 Nikolay Melnikov <n.melnikov@depra.org>
// © 2023-2024 Nikolay Melnikov <n.melnikov@depra.org>

using Depra.Ecs.QoL.Components;
using UnityEngine;

namespace Depra.Ecs.Components
{
public struct RigidbodyForceMode
public struct RigidbodyForceMode : IComponent
{
public ForceMode Value;
}
Expand Down
5 changes: 3 additions & 2 deletions Runtime/RigidbodyRef.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// SPDX-License-Identifier: Apache-2.0
// © 2023 Nikolay Melnikov <n.melnikov@depra.org>
// © 2023-2024 Nikolay Melnikov <n.melnikov@depra.org>

using Depra.Ecs.QoL.Components;
using UnityEngine;

namespace Depra.Ecs.Components
{
public struct RigidbodyRef
public struct RigidbodyRef : IComponent
{
public Rigidbody Value;
}
Expand Down
5 changes: 3 additions & 2 deletions Runtime/SliderRef.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// SPDX-License-Identifier: Apache-2.0
// © 2023 Nikolay Melnikov <n.melnikov@depra.org>
// © 2023-2024 Nikolay Melnikov <n.melnikov@depra.org>

using Depra.Ecs.QoL.Components;
using UnityEngine.UI;

namespace Depra.Ecs.Components
{
public struct SliderRef
public struct SliderRef : IComponent
{
public Slider Value;
}
Expand Down
8 changes: 6 additions & 2 deletions Runtime/TransformRef.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
using UnityEngine;
// SPDX-License-Identifier: Apache-2.0
// © 2023-2024 Nikolay Melnikov <n.melnikov@depra.org>

using Depra.Ecs.QoL.Components;
using UnityEngine;

namespace Depra.Ecs.Components
{
public struct TransformRef
public struct TransformRef : IComponent
{
public Transform Value;
}
Expand Down
10 changes: 5 additions & 5 deletions Runtime/UnityComponents.cs → Runtime/UnityComponentsAspect.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// SPDX-License-Identifier: Apache-2.0
// © 2023 Nikolay Melnikov <n.melnikov@depra.org>
// © 2023-2024 Nikolay Melnikov <n.melnikov@depra.org>

using Depra.Ecs.Worlds;

namespace Depra.Ecs.Components
{
public sealed class UnityComponents : IWorldRegistry
public sealed class UnityComponentsAspect : IComponentAspect
{
public ComponentPool<CameraRef> Cameras { get; private set; }
public ComponentPool<SliderRef> Sliders { get; private set; }
Expand All @@ -16,9 +16,9 @@ public sealed class UnityComponents : IWorldRegistry
public ComponentPool<RigidbodyForceMode> ForceModes { get; private set; }
public ComponentPool<CharacterControllerRef> CharacterControllers { get; private set; }

void IWorldRegistry.Initialize(World world)
void IComponentAspect.Initialize(World world)
{
world.AddRegistry(this);
world.AddAspect(this);
world.AddPool(Cameras = new ComponentPool<CameraRef>());
world.AddPool(Sliders = new ComponentPool<SliderRef>());
world.AddPool(Animators = new ComponentPool<AnimatorRef>());
Expand All @@ -29,6 +29,6 @@ void IWorldRegistry.Initialize(World world)
world.AddPool(CharacterControllers = new ComponentPool<CharacterControllerRef>());
}

void IWorldRegistry.PostInitialize() { }
void IComponentAspect.PostInitialize() { }
}
}
File renamed without changes.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.depra.ecs.components",
"version": "0.1.0",
"version": "0.1.1",
"displayName": "Depra.Ecs.Components",
"description": "Components for Unity types.",
"unity": "2022.3",
Expand Down

0 comments on commit de4e9c6

Please sign in to comment.