Exemplo n.º 1
0
    private void AfterReload()
    {
        _afterReload = null;

        if (FightUtils.StopAttacking(this))
        {
            StopAttack();
            return;
        }

        Arrow.gameObject.SetActive(false);
        AnimationUtils.PlayAnimation(
            "Attack", Avatar
            , playImediatly: true
            , accessory: Cape, accessoryName: "Body"
            , accessory2: Bow, accessory2Name: "Bow"
            );

        var animTime            = AnimationUtils.GetAnimationLength(Avatar, "Attack_Body", basedOnSpeed: true);
        var arrowExpirationTime = animTime / 6;

        Timer._.InternalWait(FireProjectile, arrowExpirationTime);
        // _fireProjectile = Game.WaitForSeconds(arrowExpirationTime, FireProjectile);
        // StartCoroutine(_fireProjectile);

        Timer._.InternalWait(AfterAttack, animTime);
        // _afterAttack = Game.WaitForSeconds(animTime, AfterAttack);
        // StartCoroutine(_afterAttack);
    }
Exemplo n.º 2
0
    private void AfterReload()
    {
        _afterReload = null;

        if (FightUtils.StopAttacking(this))
        {
            StopAttack();
            return;
        }

        AnimationUtils.PlayAnimation("Attack", Avatar
                                     , attackPhase: AttackPhase, singleVariation: false
                                     , playImediatly: true
                                     , accessory: Weapon, accessoryName: "Axe"
                                     , accessory2: Shield, accessory2Name: "Shield");

        AxeHitArea.gameObject.SetActive(true);
        AxeHitArea.Reset();

        var animTime = AnimationUtils.GetAnimationLength(Avatar, "Attack_Body_" + AttackPhase.Value, basedOnSpeed: true);

        Timer._.InternalWait(AfterAttack, animTime);
        // _afterAttack = Game.WaitForSeconds(animTime, AfterAttack);
        // StartCoroutine(_afterAttack);
    }
Exemplo n.º 3
0
    private void AfterAttack()
    {
        _afterAttack = null;

        if (FightUtils.StopAttacking(this))
        {
            StopAttack();
            return;
        }

        InternalAttack();
    }
Exemplo n.º 4
0
    private void AfterReload()
    {
        _afterReload = null;

        if (FightUtils.StopAttacking(this))
        {
            StopAttack();
            return;
        }

        AnimationUtils.PlayAnimation(
            "Attack", Avatar
            );

        FireProjectile();

        var animTime = Avatar["Attack_Body"].length;

        Timer._.InternalWait(AfterAttack, animTime);
        // _afterAttack = Game.WaitForSeconds(animTime, AfterAttack);
        // StartCoroutine(_afterAttack);
    }
Exemplo n.º 5
0
    private void AfterAttack()
    {
        _afterAttack = null;

        AxeHitArea.gameObject.SetActive(false);

        if (FightUtils.StopAttacking(this))
        {
            StopAttack();
            return;
        }

        if (AttackPhase.Value == 3)
        {
            AttackPhase = 1;
        }
        else
        {
            AttackPhase++;
        }

        InternalAttack();
    }