public void Update()
 {
     spelling.Update();
     building.Update();
     if (building.model.isSelectNow)
     {
         building.model.isSelectNow  = false;
         spelling.model.contentIndex = building.model.selectedIndex;
         spelling.Populate();
     }
     else if (spelling.model.isExitNow)
     {
         if (1 <= spelling.model.answerCount)
         {
             building.model.Answer(spelling.model.answerCount);
         }
         spelling.model.isExitNow = false;
         building.model.state     = "spellingToBuilding";
     }
     else if (spelling.model.isAnswerAllNow)
     {
         spelling.model.isAnswerAllNow = false;
         building.model.state          = "spellingToBuilding";
         building.model.Complete();
     }
     AnimationView.SetState(view.state, building.model.state);
 }
Пример #2
0
 public void Update()
 {
     UpdateButtons();
     for (int index = 0; index < DataUtil.Length(view.cellStates); index++)
     {
         AnimationView.SetState(view.cellStates[index], model.cellStates[index]);
     }
 }
Пример #3
0
 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);
     }
 }