Initial import

This commit is contained in:
ldbetteridge
2026-03-31 15:59:23 +01:00
commit 58da5d1d71
136 changed files with 10922 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
using Unity.Entities;
using UnityEngine;
using EE2Clone.Components;
using EE2Clone.Core;
namespace EE2Clone.Authoring
{
public class ResourceNodeAuthoring : MonoBehaviour
{
public ResourceType ResourceType = ResourceType.Food;
public int StartingAmount = 500;
public class Baker : Baker<ResourceNodeAuthoring>
{
public override void Bake(ResourceNodeAuthoring authoring)
{
var entity = GetEntity(TransformUsageFlags.Dynamic);
AddComponent(entity, new ResourceNodeTag());
AddComponent(entity, new ResourceNode
{
Type = authoring.ResourceType,
RemainingAmount = authoring.StartingAmount
});
}
}
}
}