Example #1
0
    private IEnumerator ShootLaser()
    {
        float laserDamage = owner.damage;

        PlayLaserEffect();
        while (isTargetInRange)
        {
            laserDamage *= scalationAmount;
            player.SendMessage("ReceiveDamage", laserDamage);
            yield return(new WaitForSeconds(scalationInterval));
        }
        StopLaserEffect();
    }
Example #2
0
    private IEnumerator ShootLaser()
    {
        float laserDamage = owner.damage;

        PlayLaserEffect();
        isShootingLaser = true;
        while (isTargetInRange)
        {
            laserDamage *= scalationAmount;
            player.SendMessage("ReceiveDamage", laserDamage);
            owner.RegainHealth(laserDamage * 2f);
            yield return(new WaitForSeconds(scalationInterval));
        }
        isShootingLaser = false;
        StopLaserEffect();
    }