Beispiel #1
0
    public Individual ChooseVic(int num)
    {
        int        r_whom = Random.Range(0, GameManager.instance.groupOfPlayersList.Count - 1);
        Individual vic    = GameManager.instance.groupOfPlayersList [r_whom];

        if (vic.MyPlayerState == PlayerState.Dead || vic.MyPlayerState == PlayerState.Bone || vic.CheckTopMask().MyMaskType == MaskType.Defend)
        {
            if (num < 1)
            {
                PerformMyDecision();
                return(vic);
            }
            //Debug.Log ("number of RECURSIONS "+num);
            num--;
            return(ChooseVic(num));
        }
        else
        {
            return(vic);
        }
    }