PC-20230316NUNE\Administrator 894100ae37 提交Unity 联机Pro
2024-08-17 14:27:18 +08:00

19 lines
415 B
C#

using System;
namespace Plugins.JNGame.Util
{
public class ToUtil
{
public static int Byte4ToInt(byte[] data)
{
return BitConverter.ToInt32(data, 0);
}
public static byte[] IntToByte4(int value)
{
byte[] result = new byte[4];
BitConverter.GetBytes(value).CopyTo(result, 0);
return result;
}
}
}