private void SetStatus(string json) { try { XmasStatus xmasStatus = JsonUtility.FromJson <XmasStatus>(json); if (xmasStatus != null) { status = xmasStatus; if (GiftService.statusUpdated != null) { GiftService.statusUpdated(status); } } } catch (Exception exception) { Debug.LogException(exception); } }
private void GiftService_statusUpdated(XmasStatus status) { SetValue(status.total, status.goal, status.last_goal, status.prize); }