Beispiel #1
0
    public override void addHit(GameObject h, int hitLag)
    {
        alreadyHit.Add(h);
        mngr.addHit(h);
        mngr.updateLastAttack(type);
        alreadyHit[0].GetComponent <PlayerMover>().restoreTools();
        ComboCounter c = GetComponentInParent <ComboCounter>();

        if (c)
        {
            if (type != AttackManager.AtkType.Finisher && !mngr.alreadyHitByType.Contains(h) && !GetComponentInParent <PlayerMover>().isPhase2())
            {
                c.incrementCombo(1);
            }
            else
            {
                c.resetComboTime();
            }
        }


        if (type != AttackManager.AtkType.Finisher && hitLag > 0 /*<- safety*/)
        {
            if (isGrab)
            {
                grabHitlagPending = hitLag;
            }
            else
            {
                currentHitlag = hitLag;
                mngr.lag(true);
            }
        }
    }