Ejemplo n.º 1
0
 private void UpgradePlayer(GameObject player)
 {
     if (levelUpgradeType != UpgradeType.None)
     {
         SpellCastBehaviour spellSystem = GetPlayerSpellSystem(player);
         spellSystem.UpgradeSkillTree(levelElement, levelUpgradeType);
     }
 }
    private void SetupSpellcast()
    {
        int r = Random.Range(0, possibleSkillTrees.Length);

        skillTree = possibleSkillTrees[r];

        availableElements = skillTree.AvailableElements;

        spellCast = GetComponent <SpellCastBehaviour>();
        spellCast.SetEnemySkillTree(skillTree);
        projectileChargeTime = spellCast.ScaleTime;
    }
Ejemplo n.º 3
0
    private void SetComponents()
    {
        if (currentElement == null)
        {
            currentElement = earthElement;
        }

        currentMovementSpeed = movementSpeed;
        controller           = GetComponent <CharacterController>();
        rigidBody            = GetComponent <Rigidbody>();
        spellCast            = GetComponent <SpellCastBehaviour>();
        mainCamera           = Camera.main;
    }
Ejemplo n.º 4
0
    private void ResetPlayer(GameObject player)
    {
        SpellCastBehaviour playerSpellSystem = GetPlayerSpellSystem(player);

        playerSpellSystem.ClearSkillTree();
    }
Ejemplo n.º 5
0
    private SpellCastBehaviour GetPlayerSpellSystem(GameObject player)
    {
        SpellCastBehaviour spellSystem = player.GetComponent <SpellCastBehaviour>();

        return(spellSystem);
    }