Пример #1
0
 public PersonalInformation(CharacterName characterName, CharacterSex characterSex,
                            CharacterRace characterRace, CharacterBackground characterBackground, CharacterAge characterAge,
                            CharacterHeight characterHeight, CharacterWeight characterWeight, CharacterHairStyle hairStyle)
 {
     cName       = characterName;
     cRace       = characterRace;
     cSex        = characterSex;
     cBackground = characterBackground;
     cHeight     = characterHeight;
     cWeight     = characterWeight;
     cAge        = characterAge;
     cHair       = hairStyle;
 }
Пример #2
0
    public Character loadData(string textFile2, Unit u)
    {
        Character ch = new Character();

        //	ch.characterLoadout = characterLoadout;
        ch.setCharacterLoadout(characterLoadout);
        ch.unit = u;
        if (textFile2 != null && textFile2 != "")
        {
            textFile = textFile2;
        }
        if (textFile != null && textFile != "")
        {
            ch.loadCharacterFromTextFile(textFile);
        }
        else
        {
            CharacterRace  mCRace  = CharacterRace.getRace(mCRaceName);
            CharacterClass mCClass = CharacterClass.getClass(mCClassName);

            CharacterHairStyle hairSt;
            if (hairPrefab != null)
            {
                hairSt = new CharacterHairStyle(hairPrefab);
            }
            else
            {
                hairSt = new CharacterHairStyle((hairStyle >= 0 && hairStyle < PersonalInformation.hairTypes.Length ? hairStyle : 0));
            }

            ch.loadCharacter(firstName, lastName, mCSex, mCRace, age,
                             mCBackground, height, weight, mCClass,
                             mCSturdy, mCPerception, mCTechnique, mCWellVersed, characterColor, headColor, primaryColor, secondaryColor, hairSt);
            int level      = ch.characterSheet.characterProgress.setLevel(mClevel);
            int experience = ch.characterSheet.characterProgress.setExperience(mCexperience);
        }
        return(ch);
    }
Пример #3
0
    public void loadCharacter(string firstName, string lastName, CharacterSex mCSex, CharacterRace mCRace, int age,
                              CharacterBackground mCBackground, int height, int weight, CharacterClass mCClass,
                              int mCSturdy, int mCPerception, int mCTechnique, int mCWellVersed,
                              Color characterColor, Color headColor, Color primaryColor, Color secondaryColor, CharacterHairStyle hairStyle)
    {
        int heightRemainder = height % 12;

        height -= heightRemainder;

        personalInfo = new PersonalInformation(new CharacterName(firstName, lastName),
                                               mCSex, mCRace, mCBackground, new CharacterAge(age),
                                               new CharacterHeight(height, heightRemainder),
                                               new CharacterWeight(weight), hairStyle);
        characterProgress = new CharacterProgress(mCClass);
        abilityScores     = new AbilityScores(mCSturdy, mCPerception, mCTechnique, mCWellVersed);
        combatScores      = new CombatScores(abilityScores, personalInfo, characterProgress);
        skillScores       = new SkillScores(combatScores, characterProgress);
        CharacterColors characterColors = new CharacterColors(characterColor, headColor, primaryColor, secondaryColor);

        characterSheet = new CharacterSheet(abilityScores, personalInfo,
                                            characterProgress, combatScores, skillScores, characterColors, this, characterLoadout);
    }