2026-06-13 04:56:50 +01:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
2020-12-22 03:13:43 +00:00
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
|
|
using System;
|
2020-03-22 19:05:26 +00:00
|
|
|
using Unity.Mathematics;
|
|
|
|
|
|
|
|
|
|
public interface INamedEntry
|
|
|
|
|
{
|
|
|
|
|
string EntryName { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
2026-06-13 17:22:03 +01:00
|
|
|
public abstract class RuntimeCatalogEntry
|
2020-03-22 19:05:26 +00:00
|
|
|
{
|
2020-05-14 02:47:07 +01:00
|
|
|
public Guid ID = Guid.NewGuid();
|
2021-04-07 01:27:35 +01:00
|
|
|
|
|
|
|
|
public override int GetHashCode()
|
|
|
|
|
{
|
|
|
|
|
return ID.GetHashCode();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override bool Equals(object obj)
|
|
|
|
|
{
|
2026-06-13 17:22:03 +01:00
|
|
|
if (obj is RuntimeCatalogEntry entry) return entry.ID == ID;
|
2021-04-07 01:27:35 +01:00
|
|
|
return false;
|
|
|
|
|
}
|
2021-03-31 04:07:11 +01:00
|
|
|
}
|
|
|
|
|
|
2026-06-13 20:02:41 +01:00
|
|
|
public class RuntimeItemReference
|
2021-03-31 04:07:11 +01:00
|
|
|
{
|
2026-06-13 20:02:41 +01:00
|
|
|
public ItemData Value { get; private set; }
|
|
|
|
|
public Guid ItemId;
|
2021-03-31 04:07:11 +01:00
|
|
|
|
2026-06-13 20:02:41 +01:00
|
|
|
public RuntimeItemReference()
|
2026-06-13 06:45:07 +01:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2026-06-13 20:02:41 +01:00
|
|
|
public RuntimeItemReference(ItemData value)
|
2026-06-13 06:45:07 +01:00
|
|
|
{
|
2026-06-13 17:38:05 +01:00
|
|
|
SetValue(value);
|
|
|
|
|
}
|
2026-06-13 06:45:07 +01:00
|
|
|
|
2026-06-13 20:02:41 +01:00
|
|
|
public void SetValue(ItemData value)
|
2026-06-13 17:38:05 +01:00
|
|
|
{
|
|
|
|
|
Value = value;
|
2026-06-13 20:02:41 +01:00
|
|
|
ItemId = value?.ID ?? Guid.Empty;
|
2026-06-13 06:45:07 +01:00
|
|
|
}
|
2021-04-07 01:27:35 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public interface ITintInspector
|
|
|
|
|
{
|
|
|
|
|
float3 TintColor { get; }
|
2026-06-13 06:45:07 +01:00
|
|
|
}
|