projectEli/Assets/NeoFPS/Core/NeoSaveGames/Serialization/NeoSerializationKey.cs

26 lines
524 B
C#
Raw Normal View History

2022-11-07 01:28:33 +00:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace NeoSaveGames.Serialization
{
public struct NeoSerializationKey
{
private int value;
public bool isValid
{
get { return value != 0; }
}
public NeoSerializationKey(string key)
{
value = Animator.StringToHash(key);
}
public static implicit operator int(NeoSerializationKey key)
{
return key.value;
}
}
}