public void SetOwner(ZoneUpdatePacket packet) { if (zones.Find(x => x.ID == packet.id) == null) { return; } zones.Find(x => x.ID == packet.id).OwnerID = packet.ownerID; zones.Find(x => x.ID == packet.id).effect = SpawnEffect(zones.Find(x => x.ID == packet.id)); }
private void OnZoneUpdate(SocketIOEvent obj) { ZoneUpdatePacket packet = JsonUtility.FromJson <ZoneUpdatePacket>(obj.data); ZoneManager.getInstance.SetOwner(packet); }