Inheritance: AreaMeleeSkill
Exemple #1
0
 void initializeSpells()
 {
     dash       = gameObject.AddComponent(typeof(Dash)) as Dash;
     rage       = gameObject.AddComponent(typeof(Rage)) as Rage;
     spinAttack = gameObject.AddComponent(typeof(SpinAttack)) as SpinAttack;
     cut        = gameObject.AddComponent(typeof(Cut)) as Cut;
     cripple    = gameObject.AddComponent(typeof(Cripple)) as Cripple;
 }
Exemple #2
0
    public CharacterAttack GetCharacterAttack(int[] attackIDs)
    {
        CharacterAttack charAttack = new CharacterAttack();

        for (int i = 0; i < attackIDs.Length; ++i)
        {
            AttackInfo attackInfo = InfoManager.Instance.attackInfoDic[attackIDs[i]];

            AttackBase skill = null;

            switch (attackInfo.attackType)
            {
            case AttackType.Basic:
                skill = new BasicAttack();
                break;

            case AttackType.Throw:
                skill = new ThrowAttack();
                break;

            case AttackType.Spin:
                skill = new SpinAttack();
                break;

            case AttackType.Radiate:
                Debug.Log("radiate skill is not developed");
                skill = null;
                break;

            default:
                Debug.Log("Skill has no type");
                skill = null;
                break;
            }

            skill.SetSkillInfo(attackInfo.effectName,
                               attackInfo.skillPower,
                               attackInfo.minDistance,
                               attackInfo.coolTime);

            charAttack.AddAttack(skill);
        }

        return(charAttack);
    }
    public void AirSpin()
    {
        currentSpinAttackObj = Instantiate(SpinAttackObject, this.transform.position, transform.rotation);
        currentSpinAttackObj.transform.parent = this.transform;

        Invoke("EndSpinAttack", spinAttackLifespan);

        SpinAttack spinAttack = currentSpinAttackObj.GetComponent <SpinAttack>();

        spinAttack.damage          = spinDamage + attackPower;
        spinAttack.knockback       = spinKnockback;
        spinAttack.damageFrequency = spinAttackDamageFrequency;

        isSpinAttacking = true;
        rotating        = true;

        Manager.Instance.playerAudio.PlayPlayerVoice(spinAttackGrunt);
    }