예제 #1
0
        private void Shoot()
        {
            if (isShootLocked)
            {
                return;
            }

            isShootLocked = true;

            Vector3        shootDir   = GetShootDirection();
            ProjectileView projectile = projectileViewFactory.Create(shootSrcPivot.position, shootDir, 2f);

            projectile.OnInfluenceEnd
            .Subscribe(_ => OnEndStep.Execute(this))
            .AddTo(this);

            OnShoot.Execute(new ShootEventArgs(this, projectile));
        }