private string GetRandomName(EBiologicalSex _sex)
    {
        switch (_sex)
        {
        case EBiologicalSex.Male:
            return(GetRandomElementInArray <string>(maleNames));

        case EBiologicalSex.Female:
            return(GetRandomElementInArray <string>(femaleNames));

        default:
            return("");
        }
    }
Exemplo n.º 2
0
    // ********************************************************************************************

    public Person(string _name, Sprite _icon, EBiologicalSex _sex, float _paycheckAmount, float _savingsPercentage, uint _weeksBetweenPay)
    {
        id                 = Person.NextId++;
        name               = _name;
        icon               = _icon;
        biologicalSex      = _sex;
        paycheckAmount     = _paycheckAmount;
        savingsPercentage  = _savingsPercentage;
        expensesPercentage = 1.0f - _savingsPercentage;
        weeksBetweenPay    = _weeksBetweenPay;

        personalValue = 0.0f;
        portfolio     = new Dictionary <Person, float>();

        CalculateWeeklyExpenses();
    }