コード例 #1
0
    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));
    }
コード例 #2
0
    private void OnZoneUpdate(SocketIOEvent obj)
    {
        ZoneUpdatePacket packet = JsonUtility.FromJson <ZoneUpdatePacket>(obj.data);

        ZoneManager.getInstance.SetOwner(packet);
    }