public IEnumerator EventCall(Events e, List <GameObject> targets) { for (int i = 0; i < EventList.GetLength(0); i++) { if (EventList [i].GetComponent <EventScript>().eventType == e) { EventScript ES = EventList[i].GetComponent <EventScript>(); ES.EventGenerat(targets); //イベント終了まで待機 while (ES.isEvent) { yield return(null); } } } }