Ejemplo n.º 1
0
    //protected override void Update()
    //{
    //    base.Update();
    //    if (followTarget != null)
    //    {
    //        FollowTarget();
    //        if (followTarget != null && Vector2.Distance(transform.position, followTarget.position) <= PlayerAttackDistance)
    //            Attack();
    //    }
    //    else
    //        MoveByRoute();

    //}
    protected override void Attack()
    {
        //Доделать анимацию!!!
        if (timer >= TimeToAttack)
        {
            shooter.Shoot(stats.Damage, PlayerTeg, followTarget.position - transform.position);


            timer = 0;
        }
    }
Ejemplo n.º 2
0
 public void Shoot()
 {
     _enemyShooter.Shoot();
 }
 public void PlaySoundShoot()
 {
     shootScript.Shoot();
 }