// UIを初期化する。 protected void InitUI(UIBase behaviour, GameObject root, UI_TYPE_ID id) { Button[] buttons = root.GetComponentsInChildren <Button>(); UIInput[] uiInputs = root.GetComponentsInChildren <UIInput>(); for (int i = 0; i < buttons.Length; i++) { Button button = buttons[i]; buttons[i].onClick.AddListener(() => { behaviour.OnButtonClickProcess(button); }); buttonList.Add(buttons[i]); } for (int i = 0; i < uiInputs.Length; i++) { inputList.Add(uiInputs[i]); } this.id = id; UIManager.Register(this); UIAnimation.Register(this, root); }