Esempio n. 1
0
    public bool CheckForKill(int num, PlayerPiece playerPiece)
    {
        if (playerPiece.isReady)
        {
            _index = GetIndex(playerPiece);

            _index = _index + num;
            if (_index < pathsParents.redPathPoints.Length)
            {
                if (pathsParents.redPathPoints[_index].playerPiecesList.Count > 0)
                {
                    if (pathsParents.redPathPoints[_index].playerPiecesList[0].tag == _Blue && pathsParents.redPathPoints[_index].tag != _Safe)
                    {
                        playerPiece.ResetToken(pathsParents.redPathPoints[_index].playerPiecesList[0], pathsParents.redPathPoints[_index]);
                        return(true);
                    }
                }
            }
        }

        _step2 = true;
        return(false);
    }