示例#1
0
    public CharacterData(CharacterDataTemplate templateArg)
    {
        Setup(templateArg.template);

        // set color hex code from the template's character color
        characterInfo.characterHexColorCode = ColorUtility.ToHtmlStringRGB(templateArg.characterInfoColor);

        if (templateArg.favoredWeaponTypesTemplate != null)
        {
            favoredWeaponTypes = new WeaponTypeSet(templateArg.favoredWeaponTypesTemplate);
        }

        if (templateArg.characterInventoryTemplate != null)
        {
            characterInventory = new CharacterInventory(templateArg.characterInventoryTemplate);
        }

        factionReputation = new FactionReputation(templateArg.factionReputationTemplate);

        activeAbilityLoadout = new ActiveAbilityLoadout();
        foreach (ActiveAbilityTemplate iterAbilityTemp in templateArg.activeAbilityTemplates)
        {
            activeAbilityLoadout.AddActiveAbility(new ActiveAbility(iterAbilityTemp));
        }

        outfitLoadout = new CharacterOutfitLoadout();
        foreach (CharacterOutfitTemplate iterTemp in templateArg.outfitTemplates)
        {
            outfitLoadout.AddOutfit(iterTemp);
        }
    }
示例#2
0
    private void Setup(CharacterData templateArg)
    {
        characterInfo  = new CharacterInfo(templateArg.characterInfo);
        characterStats = new CharacterStats(templateArg.characterStats);

        characterInventory = new CharacterInventory(templateArg.characterInventory);
        favoredWeaponTypes = new WeaponTypeSet(templateArg.favoredWeaponTypes);

        factionReputation = new FactionReputation(templateArg.factionReputation);

        activeAbilityLoadout = new ActiveAbilityLoadout(templateArg.activeAbilityLoadout);
        outfitLoadout        = new CharacterOutfitLoadout(templateArg.outfitLoadout);
    }
示例#3
0
    private void Setup()
    {
        characterInfo  = new CharacterInfo();
        characterStats = new CharacterStats();

        characterInventory = new CharacterInventory();
        favoredWeaponTypes = new WeaponTypeSet();

        factionReputation = new FactionReputation();

        activeAbilityLoadout = new ActiveAbilityLoadout();
        outfitLoadout        = new CharacterOutfitLoadout();
    }
    private void Setup(ActiveAbilityLoadout templateArg)
    {
        activeAbilities = new List <ActiveAbility>();
        foreach (ActiveAbility iteratingAbility in templateArg.activeAbilities)
        {
            activeAbilities.Add(new ActiveAbility(iteratingAbility));
        }

        quickSlotsAbilityIndices = new List <int>();
        foreach (int iteratingAbilityIndex in templateArg.quickSlotsAbilityIndices)
        {
            quickSlotsAbilityIndices.Add(iteratingAbilityIndex);
        }
    }
 public ActiveAbilityLoadout(ActiveAbilityLoadout templateArg)
 {
     Setup(templateArg);
 }