mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 13:01:52 +00:00
UUID: Removed empty constructor, added static Create-Function
This commit is contained in:
@@ -24,7 +24,7 @@ struct AssetHandle : IHashable
|
||||
/// Create a new random AssetHandle
|
||||
public this()
|
||||
{
|
||||
_uuid = UUID();
|
||||
_uuid = UUID.Create();
|
||||
}
|
||||
|
||||
private this(UUID uuid)
|
||||
|
||||
@@ -19,18 +19,18 @@ namespace GlitchyEngine.Core
|
||||
((.)new => Serialize, (.)new => Deserialize));
|
||||
}
|
||||
|
||||
/// Creates a new random UUID.
|
||||
public this()
|
||||
{
|
||||
_uuid = s_Random.NextU64();
|
||||
}
|
||||
|
||||
/// Creates a new UUID with the given value.
|
||||
public this(uint64 uuid)
|
||||
{
|
||||
_uuid = uuid;
|
||||
}
|
||||
|
||||
/// Creates a new random UUID.
|
||||
public static UUID Create()
|
||||
{
|
||||
return UUID(s_Random.NextU64());
|
||||
}
|
||||
|
||||
public int GetHashCode()
|
||||
{
|
||||
return (int)_uuid;
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace GlitchyEngine.World
|
||||
/// Create a new IDComponent with a random UUID.
|
||||
public this()
|
||||
{
|
||||
ID = UUID();
|
||||
ID = UUID.Create();
|
||||
}
|
||||
|
||||
public this(UUID id)
|
||||
|
||||
Reference in New Issue
Block a user