コード例 #1
0
    public void InitializeCharacter()
    {
        // Cache components
        _attributes   = GetComponent <Attributes>();
        _statsOffense = GetComponent <StatsOffense>();
        _statsDefense = GetComponent <StatsDefense>();
        _statsGeneral = GetComponent <StatsGeneral>();

        characterController = GetComponent <CharacterController>();

        LoadCharacterData();

        characterData.specialization.SetTotalSpecPoints(characterData.level);

        // Initialize Attributes
        _attributes.GenerateAugmentedCharacterAttributes(characterData.specialization, characterData.inventory);

        // Initialize statistics
        _statsOffense.GenerateAugmentedCharacterStatistics();
        _statsDefense.GenerateAugmentedCharacterStatistics();
        _statsGeneral.GenerateAugmentedCharacterStatistics();

        // Initialize Abilities

        // Set Abilities
        characterController.SetAbilities(basicAbilityPrefab, abilityQPrefab, abilityWPrefab, abilityEPrefab, abilityRPrefab);
    }
コード例 #2
0
    public void UpdateEnemy(int enemylevel)
    {
        level = enemylevel;

        _attributes.InitializeEnemyAttributes(level);
        _statsOffense.GenerateAugmentedCharacterStatistics();
        _statsDefense.GenerateAugmentedCharacterStatistics();
        _statsGeneral.GenerateAugmentedCharacterStatistics();
    }
コード例 #3
0
    void Awake()
    {
        thisTransform = transform;
        level         = 1;
        _attributes   = GetComponent <Attributes>();
        _statsOffense = GetComponent <StatsOffense>();
        _statsDefense = GetComponent <StatsDefense>();
        _statsGeneral = GetComponent <StatsGeneral>();

        _attributes.InitializeEnemyAttributes(1);
        _statsOffense.GenerateAugmentedCharacterStatistics();
        _statsDefense.GenerateAugmentedCharacterStatistics();
        _statsGeneral.GenerateAugmentedCharacterStatistics();
    }