Beispiel #1
0
    public void applyKnockBack(Vector2 hitdirection, float hitForce, uint hitStun)
    {
        movementScript.rigidbodyCast.velocity = (hitdirection + movementScript.getMoveDir()).normalized * hitForce * knockbackSusceptibility;
        movementScript.disableMove(hitStun);
        action stun = new action();

        stun.startup          = hitStun;
        stun.interuptPriority = 7; //arbitrary large number
        use(stun);
    }