Exemplo n.º 1
0
 public void ZombieKill(Vector2 position)
 {
     _bloodstainFactory.Produce(position);
     CounterKilled++;
     EventManager.CounterKillsChange.OnChangeTrigger(CounterKilled);
     _instantiateZombie();
 }
Exemplo n.º 2
0
 public void Shot()
 {
     if (_lastFireTime < Time.time)
     {
         float  accuracy = Random.Range(-_accuracy, _accuracy);
         var    dir      = Quaternion.AngleAxis(accuracy, Vector3.forward) * (_aim.position - transform.position).normalized;
         Bullet bullet   = _bulletsFactory.Produce(transform.position);
         bullet.AddSpeed(dir, _speedBullet);
         _lastFireTime = Time.time + 1f / _fireRate;
     }
 }
Exemplo n.º 3
0
 public void ProduceZombie(Vector2 position)
 {
     _zombiesFactory.Produce(position);
 }