Beispiel #1
0
 public void handleState(God god, string input = "")
 {
     if ("empty" == input)
     {
         god.ClearSelect();
         god.setState(God.emptyState);
     }
     else if (input == "SelectSlot")
     {
     }
 }
 public void handleState(God god, string input = "")
 {
     if ("empty" == input)   // 返回空白状态
     {
         god.ClearSelect();  // 清除所有点击记录
         god.setState(God.emptyState);
     }
     else if ("attack" == input)     // 进入攻击完成状态
     {
         god.setState(God.attackCompletedState);
     }
 }
Beispiel #3
0
 // 状态切换
 public void handleState(God god, string input = "")
 {
     if (god.isOver())   // 结束
     {
         god.setState(God.gameOverState);
     }
     else        // 进入空白状态
     {
         god.ClearSelect();
         god.setState(God.emptyState);
     }
     flag = true;
 }
        public void handleState(God god, string input = "")
        {
            // 使用卡牌
            //god.currentplayer.UseCard(god.currentplayer.SelectedCard);



            if (god.isOver())   // 结束
            {
                god.setState(God.gameOverState);
            }
            else      // 进入空白状态
            {
                god.ClearSelect();
                god.setState(God.emptyState);
            }
        }
Beispiel #5
0
 public void handleState(God god, string input = "")
 {
     if ("empty" == input)
     {
         god.ClearSelect();
         god.setState(God.emptyState);
     }
     else if ("selected" == input)
     {
         if (god.currentplayer.SelectedCard.Value.getCardType() == 0)  // 英雄牌,转到卡牌施放状态
         {
             god.setState(God.targetSelectedState);
         }
         else        // 效果牌, 转到选择目标状态
         {
             god.setState(God.targetSelectedState);
         }
     }
 }