using System.Runtime.InteropServices; namespace PerfectWorld.Scripts.Task { [StructLayout(LayoutKind.Sequential, Pack = 1)] public struct TASK_EXPRESSION { public int type; public float value; public bool Equals(TASK_EXPRESSION src) { return (type == src.type && value == src.value); } public override bool Equals(object obj) { if (obj is TASK_EXPRESSION other) { return Equals(other); } return false; } public static bool operator ==(TASK_EXPRESSION lhs, TASK_EXPRESSION rhs) { return lhs.Equals(rhs); } public static bool operator !=(TASK_EXPRESSION lhs, TASK_EXPRESSION rhs) { return !lhs.Equals(rhs); } } }