void OnReceivedResourceData(byte[] msg) { ResourceDataPacket resourceDataPacket = new ResourceDataPacket(msg); ResourceData resourceData = resourceDataPacket.GetData(); dataManager.SetResourceData(resourceData); loadingManager.dataCheck[(int)ServerPacketId.ResourceData - 4] = true; }
public ServerPacketId ResourceDataRequest(byte[] data) { string Id = LoginUser[tcpPacket.client]; Console.WriteLine("유저" + Id + "자원 데이터 요청"); int resource = database.GetAccountData(Id).Resource; ResourceData resourceData = new ResourceData(resource); ResourceDataPacket resourceDataPacket = new ResourceDataPacket(resourceData); msg = CreatePacket(resourceDataPacket, ServerPacketId.ResourceData); return(ServerPacketId.ResourceData); }