示例#1
0
    public void ShootStaticBomb()
    {
        if (!isShootingOnCooldown && !barrier.activeSelf)
        {
            GameObject newBullet = objectPool.GetStaticBomb();

            newBullet.transform.position = bulletOriginPoint.transform.position;
            var bullet = newBullet.GetComponent <BulletBehavior>();
            if (bullet != null)
            {
                bullet.SetBulletDestination(crosshair.transform.position);
            }

            StartCoroutine(BeginCooldown(EquippedWeapon.staticBomb));
        }
    }