107 lines
3.8 KiB
C#
107 lines
3.8 KiB
C#
using System;
|
|
#if UNITY_5_3_OR_NEWER
|
|
using UnityEngine;
|
|
#endif
|
|
namespace BITKit
|
|
{
|
|
public class ConstantHash
|
|
{
|
|
public ConstantHash(object value)
|
|
{
|
|
#if UNITY_5_3_OR_NEWER
|
|
HashCode = Animator.StringToHash(value.ToString());
|
|
#else
|
|
HashCode = value.GetHashCode();
|
|
#endif
|
|
AsString = value.ToString();
|
|
}
|
|
public readonly int HashCode;
|
|
public readonly string AsString;
|
|
public static implicit operator string (ConstantHash self)
|
|
{
|
|
return self.AsString;
|
|
}
|
|
public static implicit operator int (ConstantHash self)
|
|
{
|
|
return self.HashCode;
|
|
}
|
|
public static implicit operator ConstantHash(string value)
|
|
{
|
|
return new ConstantHash(value);
|
|
}
|
|
public static implicit operator ConstantHash(int value)
|
|
{
|
|
return new ConstantHash(value);
|
|
}
|
|
}
|
|
public static partial class Constant
|
|
{
|
|
public partial struct Header
|
|
{
|
|
public const string Animations = "Animations";
|
|
public const string Data = "Data";
|
|
public const string Status = "Status";
|
|
public const string State = "State";
|
|
public const string Settings = "Settings";
|
|
public const string Optional = "Optional";
|
|
public const string Services = "Services";
|
|
public const string AudioClip = "AudioClip";
|
|
public const string AudioSource = "AudioSource";
|
|
public const string Paths = "Paths";
|
|
public const string Gameobjects = "Gameobjects";
|
|
public const string Events = "Events";
|
|
public const string Components = "Components";
|
|
public const string Network = "Network";
|
|
public const string Reference = "Reference";
|
|
public const string Behaviour = "Behaviour";
|
|
public const string Providers = "Providers";
|
|
public const string InternalVariables = "InternalVariables";
|
|
public const string Prefabs = "Prefabs";
|
|
public const string Property = "Property";
|
|
public const string Debug = "Debug";
|
|
public const string Override = "Override";
|
|
public const string Input = "Input";
|
|
public const string Output = "Output";
|
|
public const string Graphic = "Graphic";
|
|
public const string HotFix = "HotFix";
|
|
}
|
|
public partial struct Animation
|
|
{
|
|
public const string Play = "Animation.Play";
|
|
public const string OnPlay = "Animation.OnPlay";
|
|
public const string OnPlayEnd = "Animation.OnPlayEnd";
|
|
public const string OnEvent = "Animation.OnEvent";
|
|
}
|
|
public partial struct Operation
|
|
{
|
|
public const string Add = "Add";
|
|
public const string Set = "Set";
|
|
public const string Remove = "Remove";
|
|
}
|
|
public partial struct Environment
|
|
{
|
|
public const string mat_setvideomode = nameof(mat_setvideomode);
|
|
public const string fullscreen = nameof(fullscreen);
|
|
public const string sensitivity = nameof(sensitivity);
|
|
}
|
|
public partial struct Asset
|
|
{
|
|
public const string manifest = "manifest.json";
|
|
}
|
|
public partial struct Authentication
|
|
{
|
|
public const string Token = "Token";
|
|
}
|
|
public partial struct System
|
|
{
|
|
public const string Internal = "Internal";
|
|
}
|
|
public const string Value = "Value";
|
|
public const string EmetyString = "";
|
|
public static Func<bool> True => () => true;
|
|
public static Func<bool> False => () => false;
|
|
public class EmetyClass { }
|
|
public struct EmetyStruct { }
|
|
public interface EmetyInterface { }
|
|
}
|
|
} |