public void Update() { buttons.Update(); model.Update(); if (buttons.isAnyNow) { int index = -1; if (model.IsInMenu()) { if (null != view) { var items = view.buttons[model.menuIndex]; index = items.IndexOf(buttons.view.target); } if (index <= -1) { index = StringUtil.ParseIndex(buttons.downName); } if (0 <= index) { model.Select(index); } else { index = view.exitButtons.IndexOf(buttons.view.target); if (0 <= index) { model.Exit(); } } } } ViewButtons(); if (null != view && null != model.menuName) { AnimationView.SetState(view.animatorOwner, model.menuName); } }