Exemple #1
0
    public virtual void CastLocalAttack(Vector2 startPosition, Vector2 targetPosition)
    {
        AttackController attack = GetAttack();

        attack.Initialize(this, AttackController.MoveType.Target);
        attack.SetMovement(startPosition, targetPosition, attackSpeed);
    }
    public virtual void CastLocalAttack()
    {
        isAttacking = true;

        AttackController attack = GetAttack();

        attack.Initialize(this);
        attack.SetMovement(directionX, attackSpeed, transform.position);

        StartCoroutine(WaitAttacking());
        AnimateAttack();
    }
Exemple #3
0
    public virtual void CastLocalAttack(Vector2 startPosition)
    {
        isAttacking = true;
        int yAxis = directionY;

        AttackController attack = GetAttack();

        attack.Initialize(this, AttackController.MoveType.Direction);
        attack.SetMovement(startPosition, directionX, yAxis, attackSpeed);

        StartCoroutine(WaitAttacking());
        AnimateAttack();
    }