Ejemplo n.º 1
0
    /// <summary>
    /// 单机模式玩家向指定格子移动
    /// </summary>
    /// <param name="NowStandCell"></param>
    void StandMoveAnim(PathCell NowStandCell)
    {
        Debug.Log("玩家剩余步数:" + EpheMeralActor.StandDiceCount);

        if (NowStand.m_PlayerList.Contains(GetComponent <Player>())) //安全判断
        {
            NowStand.m_PlayerList.Remove(GetComponent <Player>());   //先移除当前路径本玩家
        }
        if (NowStandCell != null)
        {
            NowStand = NowStandCell;
            GetComponent <ImageOverturn>().FlipHorizontal = NowStand.Xturn;
            transform.DOLocalJump(NowStandCell.rect.anchoredPosition3D, MoveJump, 1, MoveSpeed);
            if (NowStand == StarPos)//如果是被打回到初始位置,则不需要添加停留位置
            {
                return;
            }
            if (EpheMeralActor.StandDiceCount < 1)
            {
                if (StandEMagicAllCell())
                {
                    return;
                }
                NowStand.m_PlayerList.Add(GetComponent <Player>());//新停留位置添加此元素
                NowStand.NowStandAll();
                SceneGameController.Instance.UIGameControl.StandTakeToMove();
            }
        }
    }
Ejemplo n.º 2
0
 /// <summary>
 /// 单机模式特殊格子移动动画处理
 /// </summary>
 /// <param name="NowStandCell"></param>
 void StandMagicAnim(PathCell NowStandCell)
 {
     if (NowStand.m_PlayerList.Contains(GetComponent <Player>())) //安全判断
     {
         NowStand.m_PlayerList.Remove(GetComponent <Player>());   //先移除当前路径本玩家
     }
     if (NowStandCell != null)
     {
         NowStand = NowStandCell;
         GetComponent <ImageOverturn>().FlipHorizontal = NowStand.Xturn;
         transform.DOLocalJump(NowStandCell.rect.anchoredPosition3D, MoveJump, 1, MoveSpeed);
         if (NumAir < 1)
         {
             NowStand.m_PlayerList.Add(GetComponent <Player>());//新停留位置添加此元素
             NowStand.NowStandAll();
             SceneGameController.Instance.UIGameControl.StandTakeToMove();
         }
     }
 }