// ペット一覧取得 public IEnumerator GetPetList(bool refresh = false) { if (!refresh && PetList != null) { yield break; } bool wait = true; Protocol.Send(new PetListSend(), (r) => { PetList = new PetList(r.items); wait = false; }); while (wait) { yield return(null); } }