Ejemplo n.º 1
0
    void MediumAttack()
    {
        Spell mediumSpell = selectedGem.GetMediumAttack();

        Debug.Log(mediumSpell.GetSpellPosition());
        Vector3 spawnPostion = transform.position + transform.forward * mediumSpell.GetSpellPosition();

        GameObject mediumAttack = PhotonNetwork.Instantiate(Path.Combine("PhotonPrefabs", mediumSpell.GetSpellString()), spawnPostion, Quaternion.identity, 0);

        StartCoroutine(DestroyAfterTime(mediumAttack.GetComponent <Animator>().GetCurrentAnimatorStateInfo(0).length, mediumAttack));
    }